File tree Expand file tree Collapse file tree 4 files changed +8
-8
lines changed
packages/regex-to-strings/src Expand file tree Collapse file tree 4 files changed +8
-8
lines changed Original file line number Diff line number Diff line change 1- <!doctype html>
1+ <!DOCTYPE html>
22< html lang ="en ">
33 < head >
44 < meta charset ="utf-8 " />
Original file line number Diff line number Diff line change @@ -10,10 +10,10 @@ type anyFn = (...args: unknown[]) => void;
1010function debounce < F extends anyFn > ( func : F , wait : number ) : F {
1111 let timeoutID : number ;
1212
13- return function debounced ( this : any , ...args : any [ ] ) {
13+ return ( function debounced ( this : any , ...args : any [ ] ) {
1414 clearTimeout ( timeoutID ) ;
1515 timeoutID = window . setTimeout ( ( ) => func . apply ( this , args ) , wait ) ;
16- } as any as F ;
16+ } as any ) as F ;
1717}
1818/* eslint-enable @typescript-eslint/no-explicit-any */
1919
Original file line number Diff line number Diff line change @@ -31,7 +31,7 @@ function takeNIterations(
3131}
3232
3333// eslint-disable-next-line no-restricted-globals
34- const ctx : Worker = self as unknown as Worker ;
34+ const ctx : Worker = ( self as unknown ) as Worker ;
3535
3636function * processRequest (
3737 message : MessageEvent
Original file line number Diff line number Diff line change @@ -52,12 +52,12 @@ describe('count', () => {
5252 } ) ;
5353
5454 it ( 'counts null as zero patterns' , ( ) => {
55- const result = count ( null as unknown as string ) ;
55+ const result = count ( ( null as unknown ) as string ) ;
5656 expect ( result ) . toBe ( 0 ) ;
5757 } ) ;
5858
5959 it ( 'counts undefined as one pattern' , ( ) => {
60- const result = count ( undefined as unknown as string ) ;
60+ const result = count ( ( undefined as unknown ) as string ) ;
6161 expect ( result ) . toBe ( 1 ) ;
6262 } ) ;
6363
@@ -122,11 +122,11 @@ describe('expand', () => {
122122 } ) ;
123123
124124 it ( 'returns an empty list for null' , ( ) => {
125- const result = expandAll ( null as unknown as string ) ;
125+ const result = expandAll ( ( null as unknown ) as string ) ;
126126 expect ( result ) . toEqual ( [ ] ) ;
127127
128128 // Mirror this JavaScript behavior
129- const nativeRegex = new RegExp ( null as unknown as string ) ;
129+ const nativeRegex = new RegExp ( ( null as unknown ) as string ) ;
130130 expect ( nativeRegex . test ( '' ) ) . toBe ( false ) ;
131131 } ) ;
132132
You can’t perform that action at this time.
0 commit comments