Find a way to suppress the errors generated by importing modules #6114

Closed
raregrass opened this Issue Dec 16, 2015 · 4 comments

Comments

Projects
None yet
3 participants
@raregrass

I need to use some external modules without .d.ts files, but, I do not want to use the corresponding third party .d.ts files. Please tell me how to just suppress the errors - "Cannot find the module ...", thinks.

@DanielRosenwasser

This comment has been minimized.

Show comment
Hide comment
@DanielRosenwasser

DanielRosenwasser Dec 17, 2015

Member

Would the ideas in #2709 be a suitable way of dealing with this? Something like:

import * as blah: any from "foo/bar";
Member

DanielRosenwasser commented Dec 17, 2015

Would the ideas in #2709 be a suitable way of dealing with this? Something like:

import * as blah: any from "foo/bar";
@raregrass

This comment has been minimized.

Show comment
Hide comment
@raregrass

raregrass Dec 17, 2015

Yes, I will go there for seeking the answer, thinks for your help!
BTW, I think the idea below is good and doesn't need to change any grammar in current project. It's more friendly for developers because sometimes someone maybe want to suppress a special kind of error for debugging and there isn't, maybe I have not noticed, any way to achieve this. Please consider this proposal.

if it was possible to explicitly ignore specific TS**** errors, that would be an acceptable workaround, e.g. something like this in tsconfig.json:

{
      ignoreRules: {
          "TS2307": true
      }
}

Yes, I will go there for seeking the answer, thinks for your help!
BTW, I think the idea below is good and doesn't need to change any grammar in current project. It's more friendly for developers because sometimes someone maybe want to suppress a special kind of error for debugging and there isn't, maybe I have not noticed, any way to achieve this. Please consider this proposal.

if it was possible to explicitly ignore specific TS**** errors, that would be an acceptable workaround, e.g. something like this in tsconfig.json:

{
      ignoreRules: {
          "TS2307": true
      }
}
@DanielRosenwasser

This comment has been minimized.

Show comment
Hide comment
@DanielRosenwasser

DanielRosenwasser Dec 17, 2015

Member

Sure, that's another issue as well (#4094). I'm going to close this as a duplicate of those issues.

Member

DanielRosenwasser commented Dec 17, 2015

Sure, that's another issue as well (#4094). I'm going to close this as a duplicate of those issues.

@amcdnl

This comment has been minimized.

Show comment
Hide comment
@amcdnl

amcdnl Jun 2, 2016

Would love to see this too.

amcdnl commented Jun 2, 2016

Would love to see this too.

@Microsoft Microsoft locked and limited conversation to collaborators Jun 19, 2018

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.