Skip to content

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

Closed

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
    Needs Investigation
    on May 24, 2017
  4. added
    Bug
    and removed
    Needs Investigation
    on May 24, 2017
  5. added this to the milestone on May 24, 2017
  6. mhegazy commented on May 24, 2017

    @mhegazy
    Contributor

    PRs welcomed.

  7. added
    Effort: Moderate
    on May 24, 2017
  8. added
    Fix Available
    on Mar 20, 2024
  9. 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

    BugEffort: ModerateFix Available

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions