Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Nullish #22

Open
nmsn opened this issue Dec 23, 2022 · 1 comment
Open

Nullish #22

nmsn opened this issue Dec 23, 2022 · 1 comment

Comments

@nmsn
Copy link
Contributor

nmsn commented Dec 23, 2022

Type representing nullish values in TypeScript: null | undefined

@nmsn
Copy link
Contributor Author

nmsn commented Dec 23, 2022

/**
 * Nullish
 * @desc Type representing [nullish values][https://www.typescriptlang.org/docs/handbook/release-notes/typescript-3-7.html#nullish-coalescing] in TypeScript: `null | undefined`
 * @example
 *   type Various = 'a' | 'b' | undefined;
 *
 *   // Expect: "a" | "b"
 *   Exclude<Various, Nullish>;
 */
export type Nullish = null | undefined;

# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

No branches or pull requests

1 participant