main
ts 13 lines 380 Bytes
Raw
1 /**
2 * Copyright (c) Meta Platforms, Inc. and affiliates.
3 *
4 * This source code is licensed under the MIT license found in the
5 * LICENSE file in the root directory of this source tree.
6 */
7
8 /**
9 * Trigger an exhaustiveness check in TypeScript and throw at runtime.
10 */
11 export default function assertExhaustive(_: never, errorMsg: string): never {
12 throw new Error(errorMsg);
13 }