Skip to content

Suggestion: Add "lib" reference directive #15732

Closed
@rbuckton

Description

@rbuckton

Following discussion at DefinitelyTyped/DefinitelyTyped#15140, it seems that we might benefit from adding a new lib reference directive similar to the types reference directive we have today. The lib reference directive would allow an individual file to specify one or more lib files to include when the file is included.

Example

/// <reference lib="es2015, dom" />

This would allow individuals using @types/core-js (or any other polyfill/shim library) to automatically get the correct types.

Metadata

Metadata

Assignees

No one assigned

    Labels

    FixedA PR has been merged for this issueSuggestionAn idea for TypeScript

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions