import { Exact } from "./types" ; export class UnreachableCaseError extends Error { constructor ( value ) { super ( `Unreachable case: ${ value }` ) ; } } export function assert ( condition , msg = "no additional info provided" ) { if ( ! condition ) { throw new Error ( "Assertion Error: " + msg ) ; } } export function noop ( ... _args ) { } export const isExact = < ExpectedShape > ( ) => < ActualShape > ( x ) : ExpectedShape => { return x ; } ;