Skip to content

Support /// <reference libs="" /> #16627

Closed
@alexeagle

Description

@alexeagle

At Google, we keep all dependency information in source files, and generate the tsconfig.json file in the build tooling (https://github.com/bazelbuild/rules_typescript/blob/master/internal/common/tsconfig.bzl)

In order to generate the libs[], we currently use some special one-off comment syntax, which is not understood by editors or other tools. It would be much nicer to specify required TS libs in the source file, the same way as for types[].

Currently the behavior is not symmetric:

dep source file tsconfig.json
types /// <reference types="node"/> "types": []
libs ??? "libs": []

We'd like to be able to do /// <reference libs="es2015.collection" />

/cc @evmar

Metadata

Metadata

Assignees

No one assigned

    Labels

    DuplicateAn existing issue was already created

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions