Skip to content

Provide an API to convert tsconfig.json to CompilerOptions #5276

@IgorMinar

Description

@IgorMinar

Since IDEs like VS Code use tsconfig.json to figure out how to parse a project, it makes sense for all the other build tools (gulp, broccoli, webpack, etc) to pull the tsc config from tsconfig.json as well, instead of having their own custom way to configure tsc.

In order for this to be seamless, Typescript needs to provide a way to parse tsconfig.json to CompilerOptions object. tsc already does this internally, but all of the apis it uses are private.

I've put together my own converter for Angular/broccoli-typescript, but it will get stale with the next version of typescript until I update my option mappings. See ts-config-converter.ts added in angular/angular#4779

I believe that this task is so common that it should be part of typescripts public api.

cc: @alexeagle

Metadata

Metadata

Assignees

No one assigned

    Labels

    APIRelates to the public API for TypeScriptQuestionAn issue which isn't directly actionable in code

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions