question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

TypeScript module resolution

See original GitHub issue

According 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:closed
  • Created 6 years ago
  • Reactions:3
  • Comments:15 (11 by maintainers)

github_iconTop GitHub Comments

2reactions
matheusmlcommented, Nov 7, 2017

Just to make it clear.

It works just fine to use this with JavaScript:

import { connect, Connect, Provider } from 'redux-zero/react'

or this with TypeScript:

import * as ReactReduxZero from 'redux-zero/react'

But this, with TypeScript, is currently not working:

import { connect, Connect, Provider } from 'redux-zero/react'
0reactions
matheusmlcommented, Nov 7, 2017

You’re 100% right @Kiho

I just made a new PR that’s solving this.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found