@@ -112,46 +112,46 @@ type Exists<T> = T extends never
112112;
113113type AsSkippedEscape <
114114 T extends string ,
115- Infer extends T extends `\\${string } ${infer Skipped } `
116- ? Skipped
115+ Infer extends T extends `\\${string } ${infer Remainder } `
116+ ? Remainder
117117 : never
118118> = Exists < Infer > ;
119119type AsSkippedCharacterClass <
120120 T extends string ,
121- Infer extends unknown extends AsSkippedEscape < T , infer Skipped >
122- ? Skipped
121+ Infer extends unknown extends AsSkippedEscape < T , infer Remainder >
122+ ? Remainder
123123 : T extends `[${infer Rest } `
124124 ? ResolveCharacterClass < Rest >
125125 : never
126126> = Exists < Infer > ;
127127type AsSkippedGroup <
128128 T extends string ,
129- Infer extends unknown extends AsSkippedCharacterClass < T , infer Skipped >
130- ? Skipped
129+ Infer extends unknown extends AsSkippedCharacterClass < T , infer Remainder >
130+ ? Remainder
131131 : T extends `(${infer Rest } `
132132 ? ResolveGroup < Rest >
133133 : never
134134> = Exists < Infer > ;
135135
136136type ResolveCharacterClass < T extends string > = T extends `${infer First } ${infer Rest } `
137- ? unknown extends AsSkippedEscape < T , infer Skipped >
138- ? ResolveCharacterClass < Skipped >
137+ ? unknown extends AsSkippedEscape < T , infer Remainder >
138+ ? ResolveCharacterClass < Remainder >
139139 : First extends ']'
140140 ? Rest
141141 : ResolveCharacterClass < Rest >
142142 : never
143143;
144144type ResolveGroup < T extends string > = T extends `${infer First } ${infer Rest } `
145- ? unknown extends AsSkippedGroup < T , infer Skipped >
146- ? ResolveGroup < Skipped >
145+ ? unknown extends AsSkippedGroup < T , infer Remainder >
146+ ? ResolveGroup < Remainder >
147147 : First extends ')'
148148 ? Rest
149149 : ResolveGroup < Rest >
150150 : never
151151;
152152type ResolveAlternation < T extends string > = T extends `${infer First } ${infer Rest } `
153- ? unknown extends AsSkippedGroup < T , infer Skipped >
154- ? ResolveAlternation < Skipped >
153+ ? unknown extends AsSkippedGroup < T , infer Remainder >
154+ ? ResolveAlternation < Remainder >
155155 : First extends '|'
156156 ? Rest
157157 : ResolveAlternation < Rest >
@@ -190,8 +190,8 @@ type GroupPatterns<T extends string> = T extends `?<${infer Name}>${infer TheRes
190190 }
191191;
192192type GroupsTree < T extends string > = T extends `${string } ${infer Rest } `
193- ? unknown extends AsSkippedCharacterClass < T , infer Skipped >
194- ? GroupsTree < Skipped >
193+ ? unknown extends AsSkippedCharacterClass < T , infer Remainder >
194+ ? GroupsTree < Remainder >
195195 : unknown extends As < ResolveGroup < Rest > , infer Tail >
196196 ? T extends `(${infer Content } )${Tail } `
197197 ? [
0 commit comments