|
Last change
on this file was 9af201e, checked in by MBK <marija.karapandzova@…>, 12 days ago |
|
Fix frontend appearance
|
-
Property mode
set to
100644
|
|
File size:
449 bytes
|
| Line | |
|---|
| 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.