summaryrefslogtreecommitdiff
path: root/packages/frontend-builder/utils.ts
blob: 71ffebe03ec81884b919d85a175e6cf63b2e7ab0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
/*
 * 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 {
}