Skip to content

Property does not exist on globalThis immediately after declaring it #39504

Open
@weswigham

Description

@weswigham

Code

declare module "buf" {
    global {
        class Buffer {}
    }

    import Buf = globalThis.Buffer;
    export { Buf as Buffer };
}

Expected behavior:
No errors.

Actual behavior:
Property 'Buffer' does not exist on type 'typeof globalThis'.

Playground Link

Metadata

Metadata

Assignees

No one assigned

    Labels

    SuggestionAn idea for TypeScript

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions