Create a type predicate function that checks if input strictly equals the given value.
input
value
const isFoo = literal('foo');isFoo('foo'); // trueisFoo('bar'); // false Copy
const isFoo = literal('foo');isFoo('foo'); // trueisFoo('bar'); // false
Create a type predicate function that checks if
inputstrictly equals the givenvalue.