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.ts
interface Dep {
}
// deps/dep/package.json
{
  "typings": "dep.d.ts"
}

// src/index.ts
class Src implements Dep {}

Compile with

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

Expected behavior:

/// <reference types="dep" />
declare class Src implements Dep {
}

Actual behavior:

declare class Src implements Dep {
}
### Tasks

Activity

  1. azz commented on May 1, 2017

    @azz
    Author
  2. azz commented on May 1, 2017

    @azz
    Author

    Wrote up a test case, commit referenced above this comment.

  3. added
    BugA bug in TypeScript
    and removed
    Needs InvestigationThis issue needs a team member to investigate its status.
    on May 24, 2017
  4. added this to the milestone on May 24, 2017
  5. mhegazy commented on May 24, 2017

    @mhegazy
    Contributor

    PRs welcomed.

  6. added
    Effort: ModerateRequires experience with the TypeScript codebase, but feasible. Harder than "Effort: Casual".
    on May 24, 2017
  7. locked as resolved and limited conversation to collaborators on Oct 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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