Skip to content

Expando properties of function declarations don't get emitted in .d.ts emit #26485

@DanielRosenwasser

Description

@DanielRosenwasser
export function Foo({ x, y, z }: { x: number, y: string, z: boolean }) {
}

Foo.defaultProps = {
    x: 0,
};

Foo.defaultProps = {
    y: ""
};

Expected

Either

export declare function Foo({ x, y, z }: {
    x: number;
    y: string;
    z: boolean;
}): void;

export namespace Foo {
    export let defaultProps: { y: string };
}

or

export declare function Foo({ x, y, z }: {
    x: number;
    y: string;
    z: boolean;
}): void;

export namespace Foo {
    export let defaultProps: { x: number };
}

Metadata

Metadata

Assignees

Labels

BugA bug in TypeScriptDomain: Declaration EmitThe issue relates to the emission of d.ts filesFixedA PR has been merged for this issue

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions