Skip to content

parser: module information does not include type, interface, or namespace exports #10556

@nebrius

Description

@nebrius

This one is something of a follow-up to #10505 (comment) for some other instances where types are not listed in module outputs (sorry for not thinking to check this edge case when I filed the first bug).

import oxc from 'oxc-parser';

const code = `export type Foo = {}

export interface Bar {}

export namespace Baz {}`;

const result = oxc.parseSync('/project/a.ts', code, {
  sourceType: 'module',
});

console.log(result.module.staticExports);

Actual output:

[] // empty array

Expected output:

An array with three entries describing the three type exports.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-parserArea - ParserE-Help WantedExperience level - For the experienced collaborators

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions