path imports of packages not supported #206
Labels
Playground ATA
Holes in the current type acquisition
You Can Do This
A ticket which has been greenlighted as will be accepted
Repro: http://www.typescriptlang.org/play/#code/JYWwDg9gTgLgBAKjgQwM5wEoFNkGN4BmUEIcA5FDvmQNwBQokscA3gL5xEnmV4wC0AExIB6VFigA3CWQbho8FnThwRIuDAAWWOLhKQAdlgMx0ATwgBXOJfGC6HLqTIABEMhgTgyADb9LwCJ6lCIAKmaQAOZQyGCaZiLABoJYAB6ydASWBvjAEAZwACJYIBAAFACUrMqq6gCaVlC6ECkOQA
Currently imports such as
react-dom/server
or@material-ui/core/Typography
are not supported. It seems like it tries to fetch them by appending.d.ts
(which is only part of the usual resolution algorithm). But even by leveraging that knowledge and using e.g.import Typography from '@material-ui/core/Typography/index'
(whereimport Typography from '@material-ui/core/Typography/index.d.ts'
does exits) is not in a found module.Technically it should consider
import Typography from '@material-ui/core/Typography/index.d.ts'
inimport Typography from '@material-ui/core/Typography'
as well. In a perfect world it would also check thetypes
field inimport Typography from '@material-ui/core/Typography/package.json'
.The text was updated successfully, but these errors were encountered: