Skip to content

Commit

Permalink
chore: bump dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
wessberg committed Sep 21, 2021
1 parent 4e589a8 commit 44843bd
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 5 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@
"@types/babel__core": "^7.1.16",
"@rollup/pluginutils": "^4.1.1",
"@wessberg/stringutil": "^1.0.19",
"ts-clone-node": "^0.3.27",
"ts-clone-node": "^0.3.28",
"compatfactory": "^0.0.9",
"browserslist-generator": "^1.0.61",
"browserslist": "^4.17.0",
Expand Down
8 changes: 4 additions & 4 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

37 changes: 37 additions & 0 deletions test/declaration.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -825,3 +825,40 @@ test.serial("Flattens declarations. #20", withTypeScript, async (t, {typescript}
export { Foo };`)
);
});

test.serial("Flattens declarations. #21", withTypeScript, async (t, {typescript}) => {
const bundle = await generateRollupBundle(
[
{
entry: true,
fileName: "src/index.ts",
text: `export * from "./foo";`
},
{
entry: false,
fileName: "src/foo.ts",
text: `\
export interface Foo {
path: (string | [string, string])[]
}`
}
],
{
typescript,
debug: false
}
);
const {
declarations: [file]
} = bundle;

t.deepEqual(
formatCode(file.code),
formatCode(`
interface Foo {
path: (string | [string, string])[];
}
export { Foo };
`)
);
});

0 comments on commit 44843bd

Please sign in to comment.