{"version":3,"sources":["../../../source/schema/bigint/bigint.ts"],"names":["BUILT_IN_OBJECTS_SCHEMAS","BIGINT_ARRAY_TYPES","BIGINT64_ARRAY_SCHEMA","BIGUINT64_ARRAY_SCHEMA","BIGINT_ARRAY_SCHEMAS","validateBigIntArray","value","options","type","isBigIntArray"],"mappings":"AAAA,OAAS,4BAAAA,MAAgC,yCAElC,IAAMC,EAAqB,CAAC,SAAU,UAAU,EAG1CC,EAAwBF,EAAyB,cACjDG,EAAyBH,EAAyB,eAElDI,EAAuB,CACnC,OAAQF,EACR,SAAUC,CACX,EAaO,SAASE,EACfC,EACAC,EACqC,CACrC,GAAM,CAAE,KAAAC,CAAK,EAAID,EAEjBH,EAAqBI,CAAI,EAAE,MAAMF,CAAK,CACvC,CAEO,SAASG,EACfH,EACAC,EAC6B,CAC7B,GAAM,CAAE,KAAAC,CAAK,EAAID,EAEjB,OAAOH,EAAqBI,CAAI,EAAE,UAAUF,CAAK,EAAE,OACpD","sourcesContent":["import { BUILT_IN_OBJECTS_SCHEMAS } from \"@terminal-nerds/snippets-type/built-in\";\n\nexport const BIGINT_ARRAY_TYPES = [\"signed\", \"unsigned\"] as const;\nexport type BigIntArrayType = (typeof BIGINT_ARRAY_TYPES)[number];\n\nexport const BIGINT64_ARRAY_SCHEMA = BUILT_IN_OBJECTS_SCHEMAS.BigInt64Array;\nexport const BIGUINT64_ARRAY_SCHEMA = BUILT_IN_OBJECTS_SCHEMAS.BigUint64Array;\n\nexport const BIGINT_ARRAY_SCHEMAS = {\n\tsigned: BIGINT64_ARRAY_SCHEMA,\n\tunsigned: BIGUINT64_ARRAY_SCHEMA,\n} as const;\n\nexport interface BigIntArrays {\n\tsigned: BigInt64Array;\n\tunsigned: BigUint64Array;\n}\n\nexport type BigIntArray<Type extends BigIntArrayType> = BigIntArrays[Type];\n\ntype BigIntArrayOptions<Type extends BigIntArrayType> = {\n\ttype: Type;\n};\n\nexport function validateBigIntArray<Type extends BigIntArrayType>(\n\tvalue: unknown,\n\toptions: BigIntArrayOptions<Type>,\n): asserts value is BigIntArray<Type> {\n\tconst { type } = options;\n\n\tBIGINT_ARRAY_SCHEMAS[type].parse(value);\n}\n\nexport function isBigIntArray<Type extends BigIntArrayType>(\n\tvalue: unknown,\n\toptions: BigIntArrayOptions<Type>,\n): value is BigIntArray<Type> {\n\tconst { type } = options;\n\n\treturn BIGINT_ARRAY_SCHEMAS[type].safeParse(value).success;\n}\n"]}