Created
April 4, 2022 10:59
-
-
Save ZacharyL2/0a7bc4f8b0ea988e2a440cbdb7a93e79 to your computer and use it in GitHub Desktop.
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
{ | |
// ✨ In union types, `unknown` absorbs all other types except `any`. | |
type T1 = unknown | null; // unknown | |
type T2 = unknown | number; // unknown | |
type T3 = unknown | never; // unknown | |
type T4 = unknown | unknown; // unknown | |
type T5<T> = T | unknown; // unknown | |
// ❗ | |
type T6 = unknown | any; // any | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment