Skip to content

Commit 1d773c8

Browse files
committed
Implement IsAny helper
1 parent 0d36c8f commit 1d773c8

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/types/helpers.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ export type SubPartial<T, K extends keyof T> = Omit<T, K> & Partial<Pick<T, K>>;
2626
export type TypeGuard<T = unknown> = (value: unknown) => value is T;
2727
export type VoidClosure<T> = T extends (...args: infer A) => ClosureResult ? (...args: A) => void : never;
2828
export type Writable<T> = { -readonly [K in keyof T]: T[K] };
29+
export type IsAny<T> = { __: 'never' } extends T ? true : false;
2930

3031
// Workaround for https://github.com/typescript-eslint/typescript-eslint/issues/3573
3132
export type Use<T> = {}; // eslint-disable-line @typescript-eslint/no-unused-vars

0 commit comments

Comments
 (0)