Closed
Description
TypeScript Version: 2.5.2
Code
function someDecorator(target, key) {
}
class MyClass {
@someDecorator
field: ClientRect;
}
The transpiled output contains the following code:
__decorate([
someDecorator,
__metadata("design:type", ClientRect)
], Greeter.prototype, "field", void 0);
Expected behavior:
Runs without error on Chrome v61+.
Actual behavior:
Running the above code in Chrome v61 fails with the error: Uncaught ReferenceError: ClientRect is not defined
.
This is due to two related issues:
- Chrome replaced
ClientRect
withDOMRect
: https://groups.google.com/a/chromium.org/forum/#!msg/blink-reviews/vxvUqqj2Gnw/4sbTv97SBgAJ lib.d.ts
hasn't been updated to reflect the above change. Inconsistents with ClientRect definition #11085