Skip to content

Filter transpile diagnostics #3245

Closed
Closed

Description

I'm working on implementing the isolatedModules option using the transpile method in gulp-typescript. I get errors that lib.d.ts hasn't been found and that it cannot find global types:

error TS2318: Cannot find global type 'Array'.
error TS2318: Cannot find global type 'Boolean'.
error TS2318: Cannot find global type 'Function'.
error TS2318: Cannot find global type 'IArguments'.
error TS2318: Cannot find global type 'Number'.
error TS2318: Cannot find global type 'Object'.
error TS2318: Cannot find global type 'RegExp'.
error TS2318: Cannot find global type 'String'.
error TS6053: File 'lib.d.ts' not found.

Is there a way to filter out these messages using the API? Or should I just implement something like if (error.code === 2318 || error.code === 6053) { ... }?

In my opinion these messages should be to filter out in the transpile method, as everyone who uses that method won't be interested in those messages.

Activity

  1. mhegazy commented on May 21, 2015

    @mhegazy
    Contributor

    Ivo Gabe de Wolff (@ivogabe), you are correct. these should not be added.

  2. added this to the milestone on May 21, 2015
  3. basarat commented on May 21, 2015

    @basarat
    Contributor

    FWIW I just don't even look at the errors and just spit out the JS 👍 e.g. in https://github.com/basarat/typescript-script

    Put the burden on the JS runtime ;)

  4. added 2 commits that reference this issue on May 27, 2015
    e7eef83
    9b12fab
  5. added a commit that references this issue on Jun 4, 2015
  6. locked and limited conversation to collaborators on Jun 19, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

BugA bug in TypeScriptDomain: APIRelates to the public API for TypeScriptFixedA PR has been merged for this issue

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions