Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support new satisfies Typescript Operator #2571

Closed
eastlondoner opened this issue Sep 24, 2022 · 1 comment
Closed

Support new satisfies Typescript Operator #2571

eastlondoner opened this issue Sep 24, 2022 · 1 comment

Comments

@eastlondoner
Copy link

When using the new satisfies TypeScript operator, esbuild fails as it doesn't understand the syntax.

Documentation for operator: https://devblogs.microsoft.com/typescript/announcing-typescript-4-9-beta/#the-satisfies-operator

code

const myObject = {
    foo: 1,
    bar: 2
} satisfies Record<string, number>;

error

 errors: [
    {
      detail: undefined,
      id: '',
      location: [Object],
      notes: [],
      pluginName: '',
      text: 'Expected ";" but found "satisfies"'
    }
  ],
  warnings: []

expected behaviour

esbuild succeeds without error (ignoring the satisfies operator)

@evanw
Copy link
Owner

evanw commented Sep 24, 2022

TypeScript has removed features in the beta period before, so I’m waiting until it’s part of a real release.

Closing as a duplicate of #2509.

@evanw evanw closed this as not planned Won't fix, can't repro, duplicate, stale Sep 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants