Skip to content

Use before definition errors should not be reported in ambient contexts #9782

Closed
@mhegazy

Description

@mhegazy
// test.d.ts

declare var S: typeof A; // error TS2448: Block-scoped variable 'A' used before its declaration.
declare const A: number;  

Errors make sense only in non-ambient context.

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugA bug in TypeScriptFixedA PR has been merged for this issue

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions