misskey/packages/frontend-builder/utils.ts
anatawa12 67a0ae460d
fix(frontend): locale inliner is not working (#17543)
* feat: support facade module

* refactor: migrate typings to ESTree from rolldown/utils

* fix: name conflict from function parameter are not detected correctly

* refactor: migrate typings to ESTree from rolldown/utils

* fix: name conflict from function parameter are not detected correctly

* fix: template literal in member expression not supported

* fix: improve identifier conflict

* feat: add error when no localization are applied by locale inliner

* lint: fix lints

* fix: let rolldown to not hoist i18n modules with other modules

* chore: make error if there is unexpected specifiers

* fix license header
2026-06-05 12:36:44 +09:00

12 lines
350 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 {
}