This commit is contained in:
nora 2022-07-14 21:47:15 +02:00
parent d1b843306d
commit cda8bab89d
2 changed files with 4 additions and 2 deletions

View file

@ -1,5 +1,5 @@
{
"printWidth": 100,
"printWidth": 80,
"singleQuote": true,
"tabWidth": 2
}

View file

@ -21,7 +21,9 @@ type ParseSpec<S extends string> = FirstChar<S> extends PrintfSpec
? [SpecTypeBySpecChar[FirstChar<S>], ...RecurArgs<TailOrEmpty<S>>]
: never;
type TailOrEmpty<S extends string> = S extends `${infer Head}${infer Tail}` ? Tail : '';
type TailOrEmpty<S extends string> = S extends `${infer Head}${infer Tail}`
? Tail
: '';
type FirstChar<S extends string> = S extends ''
? never