UNPKG
type-samurai
Version:
latest (1.1.1)
1.1.1
1.1.0
1.0.1
1.0.0
Advanced utility types for Typescript
github.com/KamilHs/type-samurai
KamilHs/type-samurai
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
;