📄 nullThrows¶
📊 Analysis Summary¶
| Metric | Count |
|---|---|
| 🔧 Functions | 2 |
| 📊 Variables & Constants | 1 |
📚 Table of Contents¶
🛠️ File Location:¶
📂 packages/utils/src/eslint-utils/nullThrows.ts
Variables & Constants¶
| Name | Type | Kind | Value | Exported |
|---|---|---|---|---|
NullThrowsReasons |
{ readonly MissingParent: "Expected n... |
const | { MissingParent: 'Expected node to have a parent.', MissingToken: (token: str... |
✓ |
Functions¶
MissingToken(token: string, thing: string): string¶
Parameters:
tokenstringthingstring
Returns: string
nullThrows(value: T, message: string): NonNullable<T>¶
Assert that a value must not be null or undefined. This is a nice explicit alternative to the non-null assertion operator.
Raw JSDoc
Code
Generated by Syntax Scribe