forked from molszanski/iti
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix types resolution when
moduleResolution
is NodeNext
Two issues: 1. The `exports` map in `package.json` needs to include the `types` key. See: microsoft/TypeScript#51996 2. Explicit `.js` extension is needed for the `export ... from` statements in `src/index.ts` to satisfy ESM. Point 2 in turn required a minor tweak to the import statement in two of the tests (must import `createContainer from `./src/iti`, not merely `./src`).
- Loading branch information
Showing
4 changed files
with
7 additions
and
6 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 |
---|---|---|
@@ -1,11 +1,11 @@ | ||
// Main lib | ||
export { createContainer, createContainer as makeRoot, Container } from "./iti" | ||
export { createContainer, createContainer as makeRoot, Container } from "./iti.js" | ||
|
||
// Helper types | ||
export type { | ||
GetContainerFormat, | ||
UnPromisify, | ||
UnpackFunction, | ||
Prettify, | ||
} from "./_utils" | ||
export type { Emitter } from "./nanoevents" | ||
} from "./_utils.js" | ||
export type { Emitter } from "./nanoevents.js" |
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