Support `import` module resolution in TypeScript
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 5
- Forks
- 0
- PR merge metrics
- No merged PRs in 30d
Description
Instead of `require('ts-mutex')` I would like to use the increasingly-common import syntax:
`import Mutex from "ts-mutex"`
This only works if you turn on TS' `esModuleInterop` in tsconfig.
` "esModuleInterop": true, /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */
`
I think basically you need to emit a namespace for ts-mutex.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
The issue names no files or tests. Start by locating the package export entry point, TypeScript declarations, and build configuration, then check how both require('ts-mutex') and the requested default import are resolved. Done means the import syntax works without requiring esModuleInterop while preserving the existing require usage.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- tooling
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100