Skip to content

<reference types="" /> is not emitted when the dependency is indirect #15488

Description

@azz

TypeScript Version: 2.3.2

This is similar to #15487.

Code

// deps/dep/dep.d.ts/// <reference path="indirect.d.ts" />
// deps/dep/indirect.d.tsinterfaceDep{}
// deps/dep/package.json
{
"typings": "dep.d.ts"
}

// src/index.tsclassSrcimplementsDep{}

Compile with

// src/tsconfig.json
{
"compilerOptions": {
"declaration": true,
"types": [
"dep"
],
"typeRoots": [
"../deps"
]
}
}

Expected behavior:

/// <reference types="dep" />declareclassSrcimplementsDep{}

Actual behavior:

declareclassSrcimplementsDep{}
### Tasks

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugA bug in TypeScriptEffort: ModerateRequires experience with the TypeScript codebase, but feasible. Harder than "Effort: Casual".Fix AvailableA PR has been opened for this issueHelp WantedYou can do this

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions