File tree Expand file tree Collapse file tree 4 files changed +22
-16
lines changed
Expand file tree Collapse file tree 4 files changed +22
-16
lines changed Original file line number Diff line number Diff line change @@ -24,13 +24,6 @@ async function main() {
2424 / (?: ^ | \/ | \\ ) .+ \. d \. t s $ / . test ( libFile )
2525 ) ;
2626
27- // copy special "util" file
28- const utilFile = path . join ( betterLibDir , "lib.util.d.ts" ) ;
29- await writeFile (
30- path . join ( distDir , "lib.util.d.ts" ) ,
31- await readFile ( utilFile , "utf8" )
32- ) ;
33-
3427 // modify each lib file
3528 for ( const libFile of libFiles ) {
3629 const tsLibFile = path . join ( tsLibDir , libFile ) ;
Original file line number Diff line number Diff line change 11/// <reference no-default-lib="true" />
2- /// <reference lib="util" />
2+
3+ // -----------
4+ // additional utility types
5+ type UnionToIntersection < T > = (
6+ T extends any ? ( arg : T ) => void : never
7+ ) extends ( arg : infer F ) => void
8+ ? F
9+ : unknown ;
10+
11+ type Awaited < T > = T extends PromiseLike < infer U > ? Awaited < U > : T ;
12+ // -----------
313
414/**
515 * Evaluates JavaScript code and executes it.
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 11/// <reference no-default-lib="true" />
2- /// <reference lib="util" />
2+
3+ // -----------
4+ // additional utility types
5+ type UnionToIntersection < T > = (
6+ T extends any ? ( arg : T ) => void : never
7+ ) extends ( arg : infer F ) => void
8+ ? F
9+ : unknown ;
10+
11+ type Awaited < T > = T extends PromiseLike < infer U > ? Awaited < U > : T ;
12+ // -----------
313
414/**
515 * Evaluates JavaScript code and executes it.
You can’t perform that action at this time.
0 commit comments