File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -20,6 +20,7 @@ import {
20
20
linefeed ,
21
21
carriageReturn ,
22
22
charNotIn ,
23
+ type Input ,
23
24
} from '../src/core/inputs'
24
25
import { createRegExp , MagicRegExp } from '../src'
25
26
@@ -116,7 +117,7 @@ describe('inputs', () => {
116
117
expectTypeOf ( extractRegExp ( input ) ) . toEqualTypeOf < '\\s' > ( )
117
118
} )
118
119
it ( 'letter' , ( ) => {
119
- const input = letter
120
+ const input = letter as Input < '[a-zA-Z]' , never , [ ] >
120
121
expect ( new RegExp ( input as any ) ) . toMatchInlineSnapshot ( '/\\[a-zA-Z\\]/' )
121
122
expectTypeOf ( extractRegExp ( input ) ) . toEqualTypeOf < '[a-zA-Z]' > ( )
122
123
} )
@@ -145,7 +146,7 @@ describe('inputs', () => {
145
146
expect ( not . whitespace . toString ( ) ) . toMatchInlineSnapshot ( '"\\\\S"' )
146
147
expectTypeOf ( extractRegExp ( not . whitespace ) ) . toEqualTypeOf < '\\S' > ( )
147
148
expect ( not . letter . toString ( ) ) . toMatchInlineSnapshot ( '"[^a-zA-Z]"' )
148
- expectTypeOf ( extractRegExp ( not . letter ) ) . toEqualTypeOf < '[^a-zA-Z]' > ( )
149
+ expectTypeOf ( extractRegExp ( not . letter as Input < '[^a-zA-Z]' > ) ) . toEqualTypeOf < '[^a-zA-Z]' > ( )
149
150
expect ( not . tab . toString ( ) ) . toMatchInlineSnapshot ( '"[^\\\\t]"' )
150
151
expectTypeOf ( extractRegExp ( not . tab ) ) . toEqualTypeOf < '[^\\t]' > ( )
151
152
expect ( not . linefeed . toString ( ) ) . toMatchInlineSnapshot ( '"[^\\\\n]"' )
You can’t perform that action at this time.
0 commit comments