Download projects/gemini-cli/packages/cli/src/utils/checks.ts from LevelUp2x/adaptai: direct link, hf CLI and curl.
- Browser
- Download file 568 Bytes
-
https://huggingface.co/datasets/LevelUp2x/adaptai/resolve/2147bc06c2ccf123b96f98eace2e6bf6486e7f0e/projects/gemini-cli/packages/cli/src/utils/checks.ts
- Command line
-
hf download hf://datasets/LevelUp2x/adaptai@2147bc06c2ccf123b96f98eace2e6bf6486e7f0e/projects/gemini-cli/packages/cli/src/utils/checks.ts
-
curl -L -o checks.ts https://huggingface.co/datasets/LevelUp2x/adaptai/resolve/2147bc06c2ccf123b96f98eace2e6bf6486e7f0e/projects/gemini-cli/packages/cli/src/utils/checks.ts
568 Bytes
| /** | |
| * @license | |
| * Copyright 2025 Google LLC | |
| * SPDX-License-Identifier: Apache-2.0 | |
| */ | |
| /* Fail to compile on unexpected values. */ | |
| export function assumeExhaustive(_value: never): void {} | |
| /** | |
| * Throws an exception on unexpected values. | |
| * | |
| * A common use case is switch statements: | |
| * switch(enumValue) { | |
| * case Enum.A: | |
| * case Enum.B: | |
| * break; | |
| * default: | |
| * checkExhaustive(enumValue); | |
| * } | |
| */ | |
| export function checkExhaustive( | |
| value: never, | |
| msg = `unexpected value ${value}!`, | |
| ): never { | |
| assumeExhaustive(value); | |
| throw new Error(msg); | |
| } | |