Skip to content

Unexpected result using latest typescript 5.5.3 #98

@mauriciovillalobos

Description

@mauriciovillalobos

Seems like there is something wrong with the interactions using typescript 5.5.3

Given a simple reproduction scenario

import { ast, query } from '@phenomnomnominal/tsquery';

const jestConfig = `
  /* eslint-disable */
  export default {
    coverageDirectory: '../../coverage/apps'
  };
`;

const jestAst = ast(jestConfig);
const nodes = query(
  jestAst,
  'Identifier[name="coverageDirectory"] ~ StringLiteral',
  { visitAllChildren: true }
);
console.log(nodes.length); // <--

Logs 1 using typescript@5.4.5 and 0 using typescript@5.5.3

Haven't checked further to know specifics about why it fails.

This scenario is available on stackblitz https://stackblitz.com/edit/stackblitz-starters-b9kfqj?file=index.ts

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions