Skip to content

<reference lib="..." /> directives aren't included in output declaration files #26497

Closed
@RikkiGibson

Description

@RikkiGibson

TypeScript Version: 3.1.0-dev.20180813

Search Terms:
reference lib directive type declarations

Code

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

interface ElementHolder {
  elem: HTMLElement;
}

Expected behavior:
When running tsc test.ts --declaration, a declaration file equivalent to the below is emitted.

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

interface ElementHolder {
  elem: HTMLElement;
}

Actual behavior:
The following declaration is emitted.

interface ElementHolder {
  elem: HTMLElement;
}

Playground Link:
N/A because Playground does not emit .d.ts files

Related Issues:
Did not find any similar looking bugs

Metadata

Metadata

Assignees

Labels

BugA bug in TypeScript

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions