Skip to content

Commit

Permalink
Github Rendering Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
sinclairzx81 committed Nov 15, 2023
1 parent 9cb7b02 commit cbb4846
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/typebox.ts
Original file line number Diff line number Diff line change
Expand Up @@ -857,8 +857,9 @@ export type TTemplateLiteralConst<T, Acc extends string> =
T extends TBigInt ? `${bigint}` :
T extends TBoolean ? `${boolean}` :
never
export type TTemplateLiteralUnionInitial = '' // resolves github rendering bug
// prettier-ignore
export type TTemplateLiteralUnion<T extends TTemplateLiteralKind[], Acc extends string = ''> =
export type TTemplateLiteralUnion<T extends TTemplateLiteralKind[], Acc extends string = TTemplateLiteralUnionInitial> =
T extends [infer L, ...infer R] ? `${TTemplateLiteralConst<L, Acc>}${TTemplateLiteralUnion<Assert<R, TTemplateLiteralKind[]>, Acc>}` :
Acc
export type TTemplateLiteralKeyRest<T extends TTemplateLiteral> = Assert<UnionToTuple<Static<T>>, TPropertyKey[]>
Expand Down

0 comments on commit cbb4846

Please sign in to comment.