Created
May 9, 2026 22:33
-
-
Save waptik/820b48d924addd9438eccf4e2c035aea to your computer and use it in GitHub Desktop.
utils
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
| // https://github.com/expo/eas-cli/blob/main/packages/steps/src/utils/nullthrows.ts | |
| export function nullthrows<T>(value: T | null | undefined, message?: string): NonNullable<T> { | |
| if (value != null) { | |
| return value; | |
| } | |
| throw new TypeError(message ?? `Expected value not to be null or undefined but got ${value}`); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment