mirror of
https://github.com/misskey-dev/misskey.git
synced 2026-07-25 10:54:56 +02:00
13 lines
351 B
TypeScript
13 lines
351 B
TypeScript
/*
|
|
* SPDX-FileCopyrightText: syuilo and misskey-project
|
|
* SPDX-License-Identifier: AGPL-3.0-only
|
|
*/
|
|
|
|
export function assertNever(x: never): never {
|
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
throw new Error(`Unexpected type: ${(x as any)?.type ?? x}`);
|
|
}
|
|
|
|
export function assertType<T>(_node: unknown): asserts _node is T {
|
|
}
|