Skip to content

Ability to get if a nested namespace does not have a declare keyword #623

Closed
@dsherret

Description

@dsherret

Describe the feature

A TsModuleDecl has declare: true when within a nested namespace.

Ok(TsModuleDecl {
    span: span!(start),
    declare: self.ctx().in_declare,
    id: TsModuleName::Ident(id),
    body: Some(body),
    global: false,
})

So this means there's no way to tell if there's a declare keyword on the nested namespace.

declare module "@dsherret/package" {
    namespace packageName {
    }
}

Would it be possible to change the parser to only have declare on nodes that have a declare keyword?

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