Skip to content

Add support for Import Assertions higlight #893

Closed
@IllusionMH

Description

@IllusionMH

TS and JS Grammar Extension version: N/A Sorry, extension link is broken.

Using latest VS Code Insiders version version: 1.63.0-insider (ed3018, 2021-11-23T05:33:39.595Z)
Also search in repo shows assert only as method on console or function.

TS added support for Import Assertions in 4.5 Announcement

Proposed syntax

Code

import json from "./foo.json" assert { type: "json" };

export { val } from './foo.js' assert { type: "javascript" };

image

In editor assert is not colored as keyword and object-like notation for attributes differs from plain object (my expectation is that they will be similar, at least strings are handled as strings).

One think to consider - Bikeshed possible syntaxes for import statements #6 is still open, however initial syntax already was updates and implementations follow new syntax (shown above)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions