Skip to content

Latest commit

 

History

History
15 lines (10 loc) · 1.51 KB

File metadata and controls

15 lines (10 loc) · 1.51 KB

printf hard #template-literal

by null @Bestmain-YS

Take the Challenge    日本語

Implement Format<T extends string> generic.

For example,

type FormatCase1 = Format<"%sabc"> // FormatCase1 : string => string
type FormatCase2 = Format<"%s%dabc"> // FormatCase2 : string => number => string
type FormatCase3 = Format<"sdabc"> // FormatCase3 :  string
type FormatCase4 = Format<"sd%abc"> // FormatCase4 :  string

Back Share your Solutions Check out Solutions