-
-
Notifications
You must be signed in to change notification settings - Fork 63
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
v2.0.0 prefers '.d.ts' files to '.js' files when both exist. #33
Comments
Yes, it's just working as expected. |
@JounQin would it make sense to document this behavior somewhere in README? |
@JounQin Sorry, don't know what you mean by "it's working as expected". Both here and here. I'm having issues with lodash as well, just as in #31. In all of these scenarios, there is a default export that always used to work (with // node_modules/dataloader/index.d.ts
declare class DataLoader {}
export = DataLoader; // node_modules/@types/lodash/snakeCase.d.ts
import { snakeCase } from "./index";
export = snakeCase; So it's not working as we're expecting. |
It's not ES Module |
And you should issue to |
With On top of those already mentioned, express: external types in I'm not that well versed in Regarding disabling the rules: typescript-eslint/typescript-eslint#154 (comment) |
And also, Please, issue to |
Ok. For the For the In var snakeCase = createCompounder(function(result, word, index) {
return result + (index ? '_' : '') + word.toLowerCase();
});
module.exports = snakeCase; In import { snakeCase } from "./index";
export = snakeCase; |
I've told you the type definition is commonjs format and And it's not |
@JounQin I don't know how you can maintain this project with that attitude. I'm trying to help as you've seen. I'm not saying the problem is in the resolver - I already understood it isn't after having to dig in myself. But all these issues are related to the change in the way the resolver resolves files. You can't expect the rest of the ecosystem to automatically fix itself and just ignore it. As it stands, migrating to I've already understood the issue, so I'll move away from this thread as its not helpful. |
It is very clear I've answered your latest question at my first comment. It's great to address an issue or even usage question for this project, but I can't understand why I should answer the same question for several times. And also, I'm not ignoring them, I've answered every comment about this and pinned the most related two issues. If you'd like to help, you can also raise a PR mentioned about this. |
And also, we do have a CHANGELOG since |
In v2.0.0, it seems that the change from:
to:
...means that if a node module is imported and contains both
.js
and.d.ts
files, the.d.ts
file is now resolved instead of the.js
one. This results inimport/default
errors, e.g.:Maybe I'm missing something obvious?
The text was updated successfully, but these errors were encountered: