mirror of
https://github.com/angular/angular
synced 2026-05-24 09:28:37 +00:00
Previously the RequestOptions/ResponseOptions classes had constructors
with a destructured argument hash (represented by the
{Request,Response}OptionsArgs type). This type consists entirely of
optional members.
This produces a .d.ts file which includes the constructor declaration:
constructor({param, otherParam}?: OptionsArgs);
However, this declaration doesn't type-check properly. TypeScript
determines the actual type of the hash parameter to be OptionsArgs | undefined,
which it then concludes does not have a `param` or `otherParam` member.
This is a bug in TypeScript ( https://github.com/microsoft/typescript/issues/10078 ).
As a workaround, destructuring is moved inside the method, where it does not produce
broken artifacts in the .d.ts.
Fixes #16663.
|
||
|---|---|---|
| .. | ||
| @angular/tsc-wrapped | ||
| build | ||
| cjs-jasmine | ||
| code.angularjs.org | ||
| gulp-tasks | ||
| karma | ||
| npm | ||
| public_api_guard | ||
| travis | ||
| tree-shaking-test | ||
| tsc-watch | ||
| tslint | ||
| validate-commit-message | ||
| check-environment.js | ||
| chromedriverpatch.js | ||
| jsconfig.json | ||
| tsconfig.json | ||
| types.d.ts | ||
| utils.inc | ||