Not working for typescript
See original GitHub issueActually the problem is not with typescript - the problem is with rollup.
https://unpkg.com/memoize-one@4.0.2/dist/memoize-one.cjs.js contains
module.exports = index;
which should be imported as import * as memoizeOne
while https://unpkg.com/memoize-one@4.0.2/dist/memoize-one.esm.js contains
export default index;
which should be imported as import memoizeOne
Result - the code for nodejs (~jest) require one behaviour, while the code for webpack(uses esm bundle) requires another.
It is not a problem for js/flow, as long babel is doing some around magic default imports, but typescript is quite strict about it.
The cjs bundle should match esm bundle.
(and fixing this would introduce a breaking change)
Issue Analytics
- State:
- Created 5 years ago
- Reactions:10
- Comments:88 (58 by maintainers)
Top Results From Across the Web
typescript compiler (tsc) command not working with tsconfig
this is the problem: C:\Program Files (x86)\Microsoft SDKs\TypeScript\1.0\tsc.exe C:\Program Files (x86)\Microsoft SDKs\TypeScript\1.0\tsc.js.
Read more >Common TypeScript module problems and how to solve them
Common TypeScript module problems and how to solve them · Introduction · Problem 1: Irregular location of dependencies · Solution 1: Locate the ......
Read more >How to set up TypeScript
The Manage NuGet Packages window (which you can get to by right-clicking on a project node) · The Nuget Package Manager Console (found...
Read more >Awaited on typescript 4.5.5 not working · Issue #47803 - GitHub
Bug Report. I've installed: "typescript": "^4.5.5". try to use Awaited type, but vscode writes: Cannot find name 'Awaited'.ts(2304).
Read more >Typescript intellisense not working in VS 2019
> If your TypeScript version is less than 3.1, please Disable dedicated syntax process under Tools > Options > Text Editor > JavaScript/TypeScript...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I’m happy to add a named export if it is easier for people
Well another option is named only exports.