You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
test.ts(2,28): error TS2345: Argument of type '{ set(target: any, property: PropertyKey, value: any, receiver: any): void; }' is not assignable to parameter of type 'ProxyHandler<any>'.
Types of property 'set' are incompatible.
Type '(target: any, property: PropertyKey, value: any, receiver: any) => void' is not assignable to type '(target: any, p: PropertyKey, value: any, receiver: any) => boolean'.
Type 'void' is not assignable to type 'boolean'.
However, when not using the ES6 "function property" shorthand syntax, and instead doing the following:
Automatically closing this issue for housekeeping purposes. The issue labels indicate that it is unactionable at the moment or has already been addressed.
I recently tried to use the ES6 Proxy class to create immutable objects from given 'target' objects, using the following code:
Compiling this with:
tsc --lib es6 test.ts
fails with the following error message:
However, when not using the ES6 "function property" shorthand syntax, and instead doing the following:
Everything compiles fine.
Typescript version: 2.1.0-dev.20161007
The text was updated successfully, but these errors were encountered: