{"version":3,"sources":["../../src/functions/assertNever/assertNever.ts"],"names":[],"mappings":";AAYO,SAAS,YAAY,WAAkB,UAAU,OAAc;AACpE,MAAI,SAAS;AACX,WAAO;AAAA,EACT;AAGA,QAAM,IAAI,MAAM,+BAA+B,SAAS,EAAE;AAC5D","sourcesContent":["/**\n * Throws an error if a value is of type `never`.\n * Used for exhaustive checks.\n * @param inclusive The value to check.\n * @param noThrow If `true`, returns `undefined` instead of throwing an error.\n * @returns This function never returns a value, but throws an error if `inclusive` is of type `never`.\n * @example\n * ```typescript\n * assertNever('foo' as never); // throws an error\n * assertNever('foo' as never, true); // returns undefined\n * ```\n */\nexport function assertNever(inclusive: never, noThrow = false): never {\n  if (noThrow) {\n    return undefined as never;\n  }\n\n  // eslint-disable-next-line @typescript-eslint/restrict-template-expressions -- this is unexpected to happen, but if it does, it's better to have the value.\n  throw new Error(`Unexpected inclusive value: ${inclusive}`);\n}\n"]}