TypeScript module resolution
See original GitHub issueAccording to this https://github.com/Microsoft/TypeScript/issues/2568#issuecomment-308792266
looks like you need to change this entry in package.json from
"typings": "dist/index.d.ts"
to "types": "dist/index.d.ts"
I try to reference redux-zero/svelte in ts module but it does not work.
I had to change import statement import { getActions } from 'redux-zero/dist/svelte'
to make it work.
Issue Analytics
- State:
- Created 6 years ago
- Reactions:3
- Comments:15 (11 by maintainers)
Top Results From Across the Web
Documentation - Module Resolution - TypeScript
Module resolution is the process the compiler uses to figure out what an import refers to. Consider an import statement like import {...
Read more >Module Resolution Strategy | TypeScript Tutorial - YouTube
Access 7000+ courses for 60 days FREE: https://pluralsight.pxf.io/c/1291657/424552/7490 "How does TypeScript compiler find a module ?
Read more >Common TypeScript module problems and how to solve them
Without configuring the TypeScript compiler as discussed earlier, TypeScript will adopt the Node.js run-time resolution strategy by default in ...
Read more >A comprehensive guide to “Module System” in TypeScript ...
This strategy only kicks in if the TypeScript compiler finds a non-relative import. The Node strategy comes from the standard module resolution ......
Read more >Module Resolution in Large Projects with TypeScript
This post explains how to use custom paths for efficient Module Resolution in large TypeScript projects.
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 FreeTop 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
Top GitHub Comments
Just to make it clear.
It works just fine to use this with JavaScript:
or this with TypeScript:
But this, with TypeScript, is currently not working:
You’re 100% right @Kiho
I just made a new PR that’s solving this.