| | |
| | | } |
| | | |
| | | if (token.inner.includes('*') && (rest = remaining()) && /^\.[^\\/.]+$/.test(rest)) { |
| | | output = token.close = `)${rest})${extglobStar})`; |
| | | // Any non-magical string (`.ts`) or even nested expression (`.{ts,tsx}`) can follow after the closing parenthesis. |
| | | // In this case, we need to parse the string and use it in the output of the original pattern. |
| | | // Suitable patterns: `/!(*.d).ts`, `/!(*.d).{ts,tsx}`, `**/!(*-dbg).@(js)`. |
| | | // |
| | | // Disabling the `fastpaths` option due to a problem with parsing strings as `.ts` in the pattern like `**/!(*.d).ts`. |
| | | const expression = parse(rest, { ...options, fastpaths: false }).output; |
| | | |
| | | output = token.close = `)${expression})${extglobStar})`; |
| | | } |
| | | |
| | | if (token.prev.type === 'bos') { |