Skip to content

Upstream TS grammar bug: No semicolon after a type leads to embedded TS running amok #5

Description

@wooorm

Example:

# Dark blue?

```js
type X = 1
```

# Dark blue?

```ts
type X = 1
```

# Dark blue?

The bug is tracked at microsoft/TypeScript-TmLanguage#873.
It affects this grammar when used on GH only when using ```ts.
It affects this grammar when used in VS code everywhere.

The actual solution is upstream, but tracking it here as users might run into it.
In the mean time, add a semicolon :'(

# Dark blue?

```ts
type X = 1;
```

# Dark blue?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions