Skip to content

@ts-ignore not emitted to d.ts #20360

@shaunc

Description

@shaunc

TypeScript Version: 2.6.1
Code

I have a class deriving from a class in another package, which uses a too general type for an attribute, which I want to override. I can using @ts-ignore. However, the d.ts does not contain the @ts-ignore so another package using this package will not compile.

E.g. in foo.ts

    // @ts-ignore
    class Foo extends Bar { ... }

Expected behavior:

in foo.d.ts:

  // @ts-ignore
  declare class Foo extends Bar { ... }

Actual behavior:

in foo.d.ts:

  declare class Foo extends Bar

which triggers an error.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Working as IntendedThe behavior described is the intended behavior; this is not a bug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions