Skip to content

deno lint - no-implicit-declare-namespace-export error in declare global statement #33268

@DetachHead

Description

@DetachHead

Version: Deno 2.7.11

// error: Implicit exports in ambient namespaces are discouraged to use
//  Try adding an `export {};` to the top of the namespace to disable this behavior
declare global {
    const asdf = 1
}

following that advice causes a different error:

declare global {
    export {} // error: Exports and export assignments are not permitted in module augmentations.
    const asdf = 1
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions