Skip to content

transpileModule() fails when lib option was given #9173

@asvetliakov

Description

@asvetliakov

TypeScript Version:

Version 1.9.0-dev.20160614-1.0

Code

const typescript = require("typescript");
const input = `export class Test { }`;
const output = typescript.transpileModule(input,
    {
        compilerOptions: {
            target: "es5",
            lib: ["es2015", "dom"],
            module: "commonjs",
        },
        reportDiagnostics: true
    }
);
console.log(output.diagnostics[0].messageText);

Expected behavior:
Compiles without error

Actual behavior:

Option 'lib' cannot be specified with option 'noLib'.

Since transpileModule() forces noLib flag i'd expect it doesn't take account into lib option

Metadata

Metadata

Assignees

Labels

APIRelates to the public API for TypeScriptBugA bug in 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