Skip to content

Commit

Permalink
chore: include mixed declaration in re-export fixture
Browse files Browse the repository at this point in the history
  • Loading branch information
userquin committed Jan 13, 2025
1 parent 41d3e0d commit cefc220
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 10 deletions.
16 changes: 8 additions & 8 deletions test/__snapshots__/cjs-exports.test.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -66,15 +66,15 @@ exports[`Node10 and Node16 Default Exports Types > Re-Export Types 1`] = `
"type": "named",
},
{
"code": "export { Options }",
"end": 177,
"exports": " Options",
"code": "export { Options, type ResolvedOptions }",
"end": 271,
"exports": " Options, type ResolvedOptions",
"name": "Options",
"names": [
"Options",
],
"specifier": undefined,
"start": 159,
"start": 231,
"type": "named",
},
],
Expand All @@ -98,15 +98,15 @@ exports[`Node10 and Node16 Default Exports Types > Re-Export Types 1`] = `
"type": "named",
},
{
"code": "export { Options }",
"end": 175,
"exports": " Options",
"code": "export { Options, type ResolvedOptions }",
"end": 269,
"exports": " Options, type ResolvedOptions",
"name": "Options",
"names": [
"Options",
],
"specifier": undefined,
"start": 157,
"start": 229,
"type": "named",
},
],
Expand Down
11 changes: 9 additions & 2 deletions test/cjs-types-fixture/reexport-types/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,13 @@ import type { Options } from "./types";

export type * from "./types";

export default function plugin(options: Options = {}): Options {
return options;
export interface ResolvedOptions extends Options {
name: string;
}

export default function plugin(options: Options = {}): ResolvedOptions {
return {
...options,
name: "plugin",
};
}

0 comments on commit cefc220

Please sign in to comment.