File tree Expand file tree Collapse file tree 7 files changed +20
-20
lines changed
Expand file tree Collapse file tree 7 files changed +20
-20
lines changed Original file line number Diff line number Diff line change @@ -147,7 +147,7 @@ export const createWatchBuild = async (
147147 }
148148 } ;
149149
150- config . sys . addDestory ( close ) ;
150+ config . sys . addDestroy ( close ) ;
151151
152152 return {
153153 start,
Original file line number Diff line number Diff line change @@ -44,8 +44,8 @@ export const createSystem = (c?: { logger?: Logger }): CompilerSystem => {
4444 const items = new Map < string , FsItem > ( ) ;
4545 const destroys = new Set < ( ) => Promise < void > | void > ( ) ;
4646
47- const addDestory = ( cb : ( ) => void ) => destroys . add ( cb ) ;
48- const removeDestory = ( cb : ( ) => void ) => destroys . delete ( cb ) ;
47+ const addDestroy = ( cb : ( ) => void ) => destroys . add ( cb ) ;
48+ const removeDestroy = ( cb : ( ) => void ) => destroys . delete ( cb ) ;
4949 const events = buildEvents ( ) ;
5050 const hardwareConcurrency = ( IS_BROWSER_ENV && navigator . hardwareConcurrency ) || 1 ;
5151
@@ -407,7 +407,7 @@ export const createSystem = (c?: { logger?: Logger }): CompilerSystem => {
407407 }
408408 } ;
409409
410- addDestory ( close ) ;
410+ addDestroy ( close ) ;
411411
412412 if ( item ) {
413413 item . isDirectory = true ;
@@ -427,7 +427,7 @@ export const createSystem = (c?: { logger?: Logger }): CompilerSystem => {
427427
428428 return {
429429 close ( ) {
430- removeDestory ( close ) ;
430+ removeDestroy ( close ) ;
431431 close ( ) ;
432432 } ,
433433 } ;
@@ -447,7 +447,7 @@ export const createSystem = (c?: { logger?: Logger }): CompilerSystem => {
447447 }
448448 } ;
449449
450- addDestory ( close ) ;
450+ addDestroy ( close ) ;
451451
452452 if ( item ) {
453453 item . isDirectory = false ;
@@ -467,7 +467,7 @@ export const createSystem = (c?: { logger?: Logger }): CompilerSystem => {
467467
468468 return {
469469 close ( ) {
470- removeDestory ( close ) ;
470+ removeDestroy ( close ) ;
471471 close ( ) ;
472472 } ,
473473 } ;
@@ -586,7 +586,7 @@ export const createSystem = (c?: { logger?: Logger }): CompilerSystem => {
586586 events,
587587 access,
588588 accessSync,
589- addDestory ,
589+ addDestroy ,
590590 copyFile,
591591 createDir,
592592 createDirSync,
@@ -611,7 +611,7 @@ export const createSystem = (c?: { logger?: Logger }): CompilerSystem => {
611611 readFileSync,
612612 realpath,
613613 realpathSync,
614- removeDestory ,
614+ removeDestroy ,
615615 rename,
616616 fetch,
617617 resolvePath,
Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ export const createSysWorker = (config: ValidatedConfig) => {
1212 ) {
1313 const workerCtrl = config . sys . createWorkerController ( config . maxConcurrentWorkers ) ;
1414
15- config . sys . addDestory ( ( ) => workerCtrl . destroy ( ) ) ;
15+ config . sys . addDestroy ( ( ) => workerCtrl . destroy ( ) ) ;
1616
1717 config . logger . debug ( `create workers, maxWorkers: ${ workerCtrl . maxWorkers } ` ) ;
1818 return createWorkerMainContext ( workerCtrl ) ;
Original file line number Diff line number Diff line change @@ -71,7 +71,7 @@ export const createTsBuildProgram = async (
7171 } ,
7272 } ;
7373
74- config . sys . addDestory ( ( ) => tsWatchSys . clearTimeout ( currentBuildTimeoutId ) ) ;
74+ config . sys . addDestroy ( ( ) => tsWatchSys . clearTimeout ( currentBuildTimeoutId ) ) ;
7575
7676 /**
7777 * Create a {@link ts.WatchCompilerHost}. A CompilerHost allows a {@link ts.Program} to interact with the
Original file line number Diff line number Diff line change @@ -34,7 +34,7 @@ export const createTsWatchProgram = async (
3434 } ,
3535 } ;
3636
37- config . sys . addDestory ( ( ) => tsWatchSys . clearTimeout ( timeoutId ) ) ;
37+ config . sys . addDestroy ( ( ) => tsWatchSys . clearTimeout ( timeoutId ) ) ;
3838
3939 const tsWatchHost = ts . createWatchCompilerHost (
4040 config . tsconfig ,
Original file line number Diff line number Diff line change @@ -921,7 +921,7 @@ export interface CompilerSystem {
921921 /**
922922 * Add a callback which will be ran when destroy() is called.
923923 */
924- addDestory ( cb : ( ) => void ) : void ;
924+ addDestroy ( cb : ( ) => void ) : void ;
925925 /**
926926 * Always returns a boolean, does not throw.
927927 */
@@ -1063,7 +1063,7 @@ export interface CompilerSystem {
10631063 /**
10641064 * Remove a callback which will be ran when destroy() is called.
10651065 */
1066- removeDestory ( cb : ( ) => void ) : void ;
1066+ removeDestroy ( cb : ( ) => void ) : void ;
10671067 /**
10681068 * Rename old path to new path. Does not throw.
10691069 */
Original file line number Diff line number Diff line change @@ -76,10 +76,10 @@ export function createNodeSys(c: { process?: any } = {}): CompilerSystem {
7676 } catch ( e ) { }
7777 return hasAccess ;
7878 } ,
79- addDestory ( cb ) {
79+ addDestroy ( cb ) {
8080 destroys . add ( cb ) ;
8181 } ,
82- removeDestory ( cb ) {
82+ removeDestroy ( cb ) {
8383 destroys . delete ( cb ) ;
8484 } ,
8585 applyPrerenderGlobalPatch ( opts ) {
@@ -453,11 +453,11 @@ export function createNodeSys(c: { process?: any } = {}): CompilerSystem {
453453 tsFileWatcher . close ( ) ;
454454 } ;
455455
456- sys . addDestory ( close ) ;
456+ sys . addDestroy ( close ) ;
457457
458458 return {
459459 close ( ) {
460- sys . removeDestory ( close ) ;
460+ sys . removeDestroy ( close ) ;
461461 tsFileWatcher . close ( ) ;
462462 } ,
463463 } ;
@@ -481,11 +481,11 @@ export function createNodeSys(c: { process?: any } = {}): CompilerSystem {
481481 const close = ( ) => {
482482 tsFileWatcher . close ( ) ;
483483 } ;
484- sys . addDestory ( close ) ;
484+ sys . addDestroy ( close ) ;
485485
486486 return {
487487 close ( ) {
488- sys . removeDestory ( close ) ;
488+ sys . removeDestroy ( close ) ;
489489 tsFileWatcher . close ( ) ;
490490 } ,
491491 } ;
You can’t perform that action at this time.
0 commit comments