Skip to content

stripInternal does not strip properties declared via constructor parameters #23589

Closed
@bjouhier

Description

@bjouhier

TypeScript Version: 2.9.0-dev.20180420

Search Terms: stripInternal

Code

bug.ts:

export class Foo {
    constructor(/** @internal */ public bar: string) {}  
    /** @internal */ zoo: string;
}

tsconfig.json:

{
    "compilerOptions": {
        "declaration": true,
        "stripInternal": true
    }
}

Expected behavior:

bug.d.ts:

export declare class Foo {
    constructor(bar: string);
}

Both bar and zoo declarations are stripped

Actual behavior:

bug.d.ts:

export declare class Foo {
    bar: string;
    constructor(/** @internal */ bar: string);
}

bar declaration is not stripped.

Playground Link:
Related Issues:

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugA bug in TypeScriptDomain: Declaration EmitThe issue relates to the emission of d.ts filesHelp WantedYou can do this

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions