File tree 1 file changed +5
-6
lines changed
1 file changed +5
-6
lines changed Original file line number Diff line number Diff line change 1
- import { toCharSet } from "regexp-ast-analysis"
1
+ import { toCharSet , toUnicodeSet } from "regexp-ast-analysis"
2
2
import type {
3
3
EscapeCharacterSet ,
4
4
UnicodePropertyCharacterSet ,
@@ -63,13 +63,12 @@ export default createRule("negation", {
63
63
// All other character sets are either case-invariant
64
64
// (/./, /\s/, /\d/) or inconsistent (/\w/).
65
65
66
- // FIXME: TS Error
67
- // @ts -expect-error -- FIXME
68
- const ccSet = toCharSet ( ccNode , flags )
66
+ // since we know that the property doesn't contain strings,
67
+ // we can just get the characters of the character class
68
+ // without worrying about the strings
69
+ const ccSet = toUnicodeSet ( ccNode , flags ) . chars
69
70
70
71
const negatedElementSet = toCharSet (
71
- // FIXME: TS Error
72
- // @ts -expect-error -- FIXME
73
72
{
74
73
...element ,
75
74
negate : ! element . negate ,
You can’t perform that action at this time.
0 commit comments