mirror of
https://github.com/Noratrieb/tsfun.git
synced 2026-01-14 16:45:03 +01:00
fmt
This commit is contained in:
parent
d1b843306d
commit
cda8bab89d
2 changed files with 4 additions and 2 deletions
|
|
@ -1,5 +1,5 @@
|
||||||
{
|
{
|
||||||
"printWidth": 100,
|
"printWidth": 80,
|
||||||
"singleQuote": true,
|
"singleQuote": true,
|
||||||
"tabWidth": 2
|
"tabWidth": 2
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -21,7 +21,9 @@ type ParseSpec<S extends string> = FirstChar<S> extends PrintfSpec
|
||||||
? [SpecTypeBySpecChar[FirstChar<S>], ...RecurArgs<TailOrEmpty<S>>]
|
? [SpecTypeBySpecChar[FirstChar<S>], ...RecurArgs<TailOrEmpty<S>>]
|
||||||
: never;
|
: 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 ''
|
type FirstChar<S extends string> = S extends ''
|
||||||
? never
|
? never
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue