From 983fde0912fedc86ade63dfb6942c012f71fd47b Mon Sep 17 00:00:00 2001 From: sinclair Date: Wed, 15 Nov 2023 22:21:10 +0900 Subject: [PATCH] Github Rendering Fix --- src/typebox.ts | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/typebox.ts b/src/typebox.ts index b3047a826..1003ca387 100644 --- a/src/typebox.ts +++ b/src/typebox.ts @@ -857,15 +857,14 @@ export type TTemplateLiteralConst = T extends TBigInt ? `${bigint}` : T extends TBoolean ? `${boolean}` : never -export type TTemplateLiteralUnionInitial = '' // resolves github rendering bug // prettier-ignore -export type TTemplateLiteralUnion = +export type TTemplateLiteralUnion = T extends [infer L, ...infer R] ? `${TTemplateLiteralConst}${TTemplateLiteralUnion, Acc>}` : Acc export type TTemplateLiteralKeyRest = Assert>, TPropertyKey[]> export interface TTemplateLiteral extends TSchema { [Kind]: 'TemplateLiteral' - static: TTemplateLiteralUnion + static: TTemplateLiteralUnion type: 'string' pattern: string // todo: it may be possible to infer this pattern }