-
Notifications
You must be signed in to change notification settings - Fork 701
Closed as duplicate of#929
Closed as duplicate of#929
Copy link
Description
Steps to reproduce
./node_modules/.bin/typescript node_modules/@sinclair/typebox/typebox.d.ts
Behavior with typescript@5.8
No errors
Behavior with tsgo
node_modules/@sinclair/typebox/typebox.d.ts:137:63 - error TS2321: Excessive stack depth comparing types 'UnionToTuple<{ [K in T]: TLiteral<K>; }[T], UnionLast<{ [K in T]: TLiteral<K>; }[T]>>' and 'TSchema[]'.
137 export type TExcludeTemplateLiteralResult<T extends string> = TUnionResult<Assert<UnionToTuple<{
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
138 [K in T]: TLiteral<K>;
~~~~~~~~~~~~~~~~~~~~~~~~~~
139 }[T]>, TSchema[]>>;
~~~~~~~~~~~~~~~~~~
node_modules/@sinclair/typebox/typebox.d.ts:145:63 - error TS2321: Excessive stack depth comparing types 'UnionToTuple<{ [K in T]: TLiteral<K>; }[T], UnionLast<{ [K in T]: TLiteral<K>; }[T]>>' and 'TSchema[]'.
145 export type TExtractTemplateLiteralResult<T extends string> = TUnionResult<Assert<UnionToTuple<{
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
146 [K in T]: TLiteral<K>;
~~~~~~~~~~~~~~~~~~~~~~~~~~
147 }[T]>, TSchema[]>>;
~~~~~~~~~~~~~~~~~~
node_modules/@sinclair/typebox/typebox.d.ts:380:102 - error TS2321: Excessive stack depth comparing types 'UnionToTuple<{ [K in S]: TLiteral<K>; }[S], UnionLast<{ [K in S]: TLiteral<K>; }[S]>>' and 'TLiteral<TLiteralValue>[]'.
380 export type TUnionTemplateLiteral<T extends TTemplateLiteral, S extends string = Static<T>> = Ensure<TUnionResult<Assert<UnionToTuple<{
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
381 [K in S]: TLiteral<K>;
~~~~~~~~~~~~~~~~~~~~~~~~~~
382 }[S]>, TLiteral[]>>>;
~~~~~~~~~~~~~~~~~~~
Found 3 errors in the same file, starting at: node_modules/@sinclair/typebox/typebox.d.ts:137
Metadata
Metadata
Assignees
Labels
No labels