main
Last change
on this file was 79a0317, checked in by stefan toskovski <stefantoska84@…>, 3 days ago |
F4 Finalna Verzija
|
-
Property mode
set to
100644
|
File size:
449 bytes
|
Rev | Line | |
---|
[79a0317] | 1 | declare function unboxPrimitive<T extends unboxPrimitive.Boxed>(value: T): unboxPrimitive.Unbox<T>;
|
---|
| 2 |
|
---|
| 3 | declare namespace unboxPrimitive {
|
---|
| 4 | type Boxed = String | Number | Boolean | Symbol | BigInt;
|
---|
| 5 | type Unbox<T extends Boxed> = T extends String ? string
|
---|
| 6 | : T extends Number ? number
|
---|
| 7 | : T extends Boolean ? boolean
|
---|
| 8 | : T extends Symbol ? symbol
|
---|
| 9 | : T extends BigInt ? bigint
|
---|
| 10 | : never;
|
---|
| 11 | }
|
---|
| 12 |
|
---|
| 13 | export = unboxPrimitive;
|
---|
Note:
See
TracBrowser
for help on using the repository browser.