-
Notifications
You must be signed in to change notification settings - Fork 43
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
v4.0.1 Add explicit exports so that types match code (#122)
* Add explicit exports so that types match code * Add test for exports * Expose OpenBag * Update contributing with steps to release * Update history
- Loading branch information
Showing
8 changed files
with
95 additions
and
23 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
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
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,21 @@ | ||
import * as TypeExports from "."; | ||
import * as NodeExports from "./node"; | ||
import * as WebExports from "./web"; | ||
|
||
describe("exports", () => { | ||
it("matches web and node exports", () => { | ||
// Remove exports that are implemented differently between Node and Web. | ||
// eslint-disable-next-line @typescript-eslint/no-unused-vars | ||
const { open: _typeOpen, ...TypeSharedExports } = TypeExports; | ||
const { open: nodeOpen, Reader: NodeReader, ...NodeSharedExports } = NodeExports; | ||
const { open: webOpen, Reader: WebReader, ...WebSharedExports } = WebExports; | ||
|
||
expect(nodeOpen).toEqual(expect.any(Function)); | ||
expect(NodeReader).toEqual(expect.any(Function)); | ||
expect(webOpen).toEqual(expect.any(Function)); | ||
expect(WebReader).toEqual(expect.any(Function)); | ||
|
||
expect(NodeSharedExports).toEqual(TypeSharedExports); | ||
expect(WebSharedExports).toEqual(TypeSharedExports); | ||
}); | ||
}); |
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
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