Created
September 4, 2019 16:06
-
-
Save medfreeman/7111a9bc187807450e70f05beb9f964d to your computer and use it in GitHub Desktop.
30-seconds-of-code `isEmpty`function typescript definition
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
declare module '30-seconds-of-code' { | |
// tslint:disable-next-line: no-any | |
export function isEmpty<T extends any, P extends string>( | |
value: T | |
): T extends object ? (P extends keyof T ? false : true) : T extends string ? boolean : true; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment