-
-
Notifications
You must be signed in to change notification settings - Fork 899
Closed
Copy link
Labels
A-semanticArea - SemanticArea - SemanticC-bugCategory - BugCategory - Buggood first issueExperience Level - Good for newcomersExperience Level - Good for newcomers
Description
I've got a small follow-up to #10556.
import oxc from 'oxc-parser';
const code = `
export default interface Foo {
bar: string;
}`;
const result = oxc.parseSync('/project/a.ts', code, {
sourceType: 'module',
});
console.log(result.module.staticExports);Actual output:
[] // empty array
Expected output:
An array with an entry describing the export.
Note: this is correctly reported:
export default type Bar = {
baz: string;
}Now this one is definitely an edge case, and personally speaking if I was reviewing a PR where someone tried to do a default export of an interface I'd flag it. But it is technically legal syntax.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
A-semanticArea - SemanticArea - SemanticC-bugCategory - BugCategory - Buggood first issueExperience Level - Good for newcomersExperience Level - Good for newcomers