microsoft / TypeScript

TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

Home Page:https://www.typescriptlang.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Can we suppress rest/spread "syntax" non-errors, for babel/ES6 .js?

igrayson opened this issue · comments

This is not a feature request (for rest/spread operator) or a bug report (that rest/spread doesn't work).

  1. Is there a way to configure vscode today to suppress or otherwise not show as syntax errors the usage of the object spread operator?
  2. If this is not possible, should we update the public documentation about ES6 support (which today links to a summary of ES6 features including rest/spread) to indicate this lack of support?

ES6/ES2015 does not have support for rest/spread for object literals. nor will the next version ES7/ES2016. object rest and spread is a proposal for TC39 for ES8/ES2017. it is currently at stage 2, see https://github.com/tc39/ecma262#current-proposals. ES6 array spread is fully supported, and the documentation is accurate.

Suppressing the error is not sufficient. the whole system needs to know what it mean, so that formatting, editing, completion, etc.. work.

this is a duplicate of #2103, it is something on our road map and should be able to get to it shortly.