Skip to content

Ambient classes and functions (concrete or ambient) can merge in TypeScript 3.6 #10350

@DanielRosenwasser

Description

@DanielRosenwasser

The following code snippets will be considered valid in TypeScript 3.6 to more-easily express the "callable class" pattern.

For all intents and purposes, C should be considered a hoisted declaration like any other function.

declare class C { }
declare function C() { }
declare class C { }
function C() { }

CC @wesleywigham @RyanCavanaugh

Metadata

Metadata

Assignees

No one assigned

    Labels

    Has PRarea: typescriptoutdatedA closed issue/PR that is archived due to age. Recommended to make a new issue

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions