UNPKG
flat-type-samurai
Version:
latest (0.2.0)
0.2.0
0.1.2
0.1.1
0.1.0
Advanced utility types for Typescript
flat-type-samurai
/
src
/
stringify.d.ts
14 lines
(12 loc)
•
259 B
TypeScript
View Raw
1
2
3
4
5
6
7
8
9
10
11
12
13
14
import
{
Join
}
from
"./join"
;
/** * Transform numbers, booleans, strings, bigints to string. * ```ts * // 'true' * type Result = Stringify<true> * * ``` */
export
type
Stringify
<T> = T
extends
number
|
boolean
|
string
|
bigint
?
`
${T}
`
:
never
;