fd51e01335
This commit fixes a bug in View Engine whereby the compiler errorneously thinks that a method of a component has decorator metadata when that method is one of those in `Object.prototype`, for example `toString`. This bug is discovered in v10.0.4 of `@angular/language-service` after the default bundle format was switched from ES5 to ES2015. ES5 output: ```js if (propMetadata[propName]) { decorators.push.apply(decorators, __spread(propMetadata[propName])); } ``` ES2015 output: ```js if (propMetadata[propName]) { decorators.push(...propMetadata[propName]); } ``` The bug was not discovered in ES5 because the polyfill for the spread operator happily accepts parameters that do not have the `iterable` symbol: ```js function __spread() { for (var ar = [], i = 0; i < arguments.length; i++) ar = ar.concat(__read(arguments[i])); return ar; } ``` whereas in es2015 it’ll fail since the iterable symbol is not present in `propMetadata['toString']` which evaluates to a function. Fixes https://github.com/angular/vscode-ng-language-service/issues/859 PR Close #38292 |
||
---|---|---|
.. | ||
animations | ||
bazel | ||
benchpress | ||
common | ||
compiler | ||
compiler-cli | ||
core | ||
docs | ||
elements | ||
examples | ||
forms | ||
language-service | ||
localize | ||
misc/angular-in-memory-web-api | ||
platform-browser | ||
platform-browser-dynamic | ||
platform-server | ||
platform-webworker | ||
platform-webworker-dynamic | ||
private/testing | ||
router | ||
service-worker | ||
upgrade | ||
zone.js | ||
BUILD.bazel | ||
README.md | ||
circular-deps-test.conf.js | ||
empty.ts | ||
goog.d.ts | ||
license-banner.txt | ||
system.d.ts | ||
tsconfig-build-no-strict.json | ||
tsconfig-build.json | ||
tsconfig-test.json | ||
tsconfig.json | ||
types.d.ts |
README.md
Angular
The sources for this package are in the main Angular repo. Please file issues and pull requests against that repo.
Usage information and reference details can be found in Angular documentation.
License: MIT