Skip to content

Shorthand ambient module declarations break highlighting for rest of the file #484

@dsifford

Description

@dsifford

Hi there,

I think I found a bug. Let me know if there's anything else you need.

Thanks again for your spectacular work on this! 😄

TS and JS Grammar Extension version: 0.0.22 / latest

Code

  declare module 'foo';
//^^^^^^^ source.ts storage.modifier.ts
//        ^^^^^^ source.ts meta.namespace.declaration.ts storage.type.namespace.ts
//                ^^^ source.ts meta.namespace.declaration.ts string.quoted.single.ts
  declare module 'bar';
//^^^^^^^ ^^^^^^ source.ts meta.namespace.declaration.ts entity.name.type.module.ts
//                ^^^ source.ts meta.namespace.declaration.ts string.quoted.single.ts
declare module 'baz';

  interface Foo {
//^^^^^^^^^ ^^^ source.ts meta.namespace.declaration.ts entity.name.type.module.ts
    bar: string;
//  ^^^^ ^^^^^^ source.ts meta.namespace.declaration.ts meta.block.ts variable.other.readwrite.ts
}

Screenshot from VSCode:
image

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