Skip to content

Commit

Permalink
test: fix CI error
Browse files Browse the repository at this point in the history
  • Loading branch information
Zzzen committed Jun 5, 2022
1 parent 3d09e4d commit b03c226
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions packages/typescript-estree/tests/ast-alignment/utils.ts
Expand Up @@ -295,8 +295,12 @@ export function preprocessBabylonAST(ast: File): any {
delete node.loc.start.index;
}
},
TSTypeQuery(node: TSTypeQuery) {
const { exprName } = node;
/**
* ts-estree: `this` in `typeof this` has been converted from `Identifier` to `ThisExpression`
* @see https://github.com/typescript-eslint/typescript-eslint/pull/4382
*/
TSTypeQuery(node: any) {
const { exprName } = node as TSTypeQuery;
const processIdentifier = (identifier: Identifier) => {
if (identifier.name === 'this') {
(identifier.type as string) = 'ThisExpression';
Expand Down

0 comments on commit b03c226

Please sign in to comment.