File tree Expand file tree Collapse file tree 6 files changed +15
-10
lines changed
Expand file tree Collapse file tree 6 files changed +15
-10
lines changed Original file line number Diff line number Diff line change 11import type { ImmediateId } from './ImmediateId.js' ;
22
33const __clearImmediate : ( id : any ) => void =
4- globalThis . clearImmediate == null
4+ ( globalThis as any ) . clearImmediate == null
55 ? ( id : any ) => globalThis . clearTimeout ( id )
6- : ( id : any ) => Number ( globalThis . clearImmediate ( id ) ) ;
6+ : ( id : any ) => Number ( ( globalThis as any ) . clearImmediate ( id ) ) ;
77
88/**
99 * A polyfill for {@link clearImmediate}
Original file line number Diff line number Diff line change 11import type { ImmediateId } from './ImmediateId.js' ;
22
33const __setImmediate =
4- globalThis . setImmediate == null
4+ ( globalThis as any ) . setImmediate == null
55 ? ( fn : ( ) => void ) => globalThis . setTimeout ( fn , 0 )
6- : ( fn : ( ) => void ) => Number ( globalThis . setImmediate ( fn ) ) ;
6+ : ( fn : ( ) => void ) => Number ( ( globalThis as any ) . setImmediate ( fn ) ) ;
77
88/**
99 * A polyfill for {@link setImmediate}
Original file line number Diff line number Diff line change 22 "$schema" : " https://json.schemastore.org/tsconfig.json" ,
33 "extends" : " ../../tsconfig.settings.json" ,
44 "compilerOptions" : {
5- "rootDir" : " ./src"
5+ "rootDir" : " ./src" ,
6+ "types" : [" node" ]
67 }
78}
Original file line number Diff line number Diff line change 11{
22 "$schema" : " https://json.schemastore.org/tsconfig.json" ,
33 "extends" : " ../../tsconfig.settings.json" ,
4- "compilerOptions" : {}
4+ "compilerOptions" : {
5+ "types" : [" node" ]
6+ }
57}
Original file line number Diff line number Diff line change @@ -93,6 +93,8 @@ export const CustomError: CustomErrorConstructor = (() => {
9393 const errorName = 'CustomError' ;
9494 const __assign = Object . assign ;
9595 const __create = Object . create ;
96+ // eslint-disable-next-line ts/no-unsafe-function-type
97+ const __captureStackTrace = ( Error as any ) . captureStackTrace ?? ( ( _targetObject : object , _constructorOpt ?: Function | undefined ) => { } ) ;
9698
9799 function CustomError < Properties extends { name : string ; message ?: string ; cause ?: unknown } > (
98100 this : any ,
@@ -113,9 +115,7 @@ export const CustomError: CustomErrorConstructor = (() => {
113115 __assign ( returnValue , properties ) ;
114116
115117 // Capture stack trace
116- if ( typeof Error . captureStackTrace === 'function' ) {
117- Error . captureStackTrace ( returnValue , returnValue . constructor ) ;
118- }
118+ __captureStackTrace ( returnValue , returnValue . constructor ) ;
119119
120120 return returnValue as CustomError < Properties > ;
121121 }
Original file line number Diff line number Diff line change 11{
22 "$schema" : " https://json.schemastore.org/tsconfig.json" ,
33 "extends" : " ../../tsconfig.settings.json" ,
4- "compilerOptions" : {}
4+ "compilerOptions" : {
5+ "types" : [" node" ]
6+ }
57}
You can’t perform that action at this time.
0 commit comments