Skip to content

Commit

Permalink
refactor(validator): simplify code
Browse files Browse the repository at this point in the history
  • Loading branch information
NWYLZW committed Feb 23, 2024
1 parent 0da3bfd commit d18eb6b
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions packages/core/src/utils/isWhat.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,7 @@ const notMatched: unique symbol = Symbol('notMatched')
export function isWhat<Input = unknown, T = never>(
match: (input: Input, _: typeof notMatched) => T | typeof notMatched
): (
<O extends (
[T] extends [Input] ? Input & T : never
)>(x: Input) => x is O
(x: Input) => x is [T] extends [Input] ? Input & T : never
) {
return ((x: any): boolean => {
try {
Expand Down

0 comments on commit d18eb6b

Please sign in to comment.