mirror of
https://github.com/Noratrieb/tsfun.git
synced 2026-01-14 08:35:04 +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,
|
||||
"tabWidth": 2
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue