Created
March 12, 2019 13:38
-
-
Save achmedzhanov/e269569712b4764b33cb6598e87cefb9 to your computer and use it in GitHub Desktop.
Not null type for Typ[eScript 3.4
This file contains 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
type NotNull<T extends any | null> = T extends infer U | null ? U : T; | |
type t1 = NotNull<string>; | |
type t2 = NotNull<string|null>; | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment