Skip to content

TypeScript compiler throws error on browser library calls  #12

@lazyvar

Description

@lazyvar

Need to find a way to include https://github.com/Microsoft/TypeScript/blob/master/lib/lib.d.ts when compiling. The compiler options related to this issue are

var output = transpileModule(editor.getValue(), {
    noLib: false
});

and

getDefaultLibFileName: function() {
    return "lib.d.ts";
 },

Been fiddling with changing these values and nothing is working for me. Right now I am just hiding the errors that are related to the browser so everything appears to be working. However this hides real errors that happen to be called within a browser library call. For example:

console.log("hello".thisDoesntExist());  

The error "'hello'.thisDoesntExist is not a function' will not appear to the user because I am hiding all errors related to browser calls, in this case console.log().

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions