This repository has been archived by the owner on Mar 28, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: compatibility for export = in api-extractor patcher (#28)
- Loading branch information
1 parent
8b46340
commit f2c9223
Showing
6 changed files
with
100 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
export default { | ||
prebundle: { | ||
extraDtsDeps: ['hello'], | ||
}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
export default (files: Record<string, string>) => { | ||
// expect export namespace as ESModule | ||
expect(files['hello/index.d.ts']).toContain('export default Hello'); | ||
|
||
// expect re-export types for the exported namespace Hello | ||
expect(files['hello/index.d.ts']).toContain('type A = Hello.A'); | ||
expect(files['hello/index.d.ts']).toContain('type B = Hello.B'); | ||
expect(files['hello/index.d.ts']).toContain('type C = Hello.C'); | ||
expect(files['hello/index.d.ts']).toContain('type D = Hello.D'); | ||
expect(files['hello/index.d.ts']).toContain('type E = Hello.E'); | ||
}; |
11 changes: 11 additions & 0 deletions
11
tests/fixtures/prebundle/export-star-dts/node_modules/hello/index.d.ts
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
5 changes: 5 additions & 0 deletions
5
tests/fixtures/prebundle/export-star-dts/node_modules/hello/package.json
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"devDependencies": { | ||
"hello": "0.0.0" | ||
} | ||
} |