Skip to content

Moving to TS 2.0 causes grief due to d.ts file incompatibility #10412

Closed
@dbaeumer

Description

@dbaeumer

TypeScript Version: 1.8.x and 2.0
Code

export class A {
    get value(): number {
        return 10;
    }
}

A d.ts file for this ts file looks with 2.0 like this:

export declare class A {
    readonly value: number;
}

This d.ts file can't be consumed by clients still using 1.8.10 compiler. To ease transition to 2.0 the compiler should allow to generate 1.8 compliant d.ts file if possible, which is not possible for example with using undefined as a type.

Metadata

Metadata

Assignees

No one assigned

    Labels

    VS Code TrackedThere is a VS Code equivalent to this issueWon't FixThe severity and priority of this issue do not warrant the time or complexity needed to fix it

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions