TS Error: Unable to resolve signature of property decorator when called as an expression.
speigg opened this issue · comments
Gheric Speiginer commented
The typings for the tracked
decorator in the npm package are missing an optional specifier:
export default function tracked(obj: object, key: string | symbol, desc: PropertyDescriptor): void;
should be:
export default function tracked(obj: object, key: string | symbol, desc?: PropertyDescriptor): void;
Kristen commented
Thanks for bringing this up, can you open a PR to fix by chance? If not I should be able to get to it soon.
Gheric Speiginer commented
It's not actually clear to me why the type definitions you are generating are missing the optional specifier. The .ts
source has the correct typings.
Kristen commented
This line is probably the incorrect one: https://github.com/pzuraq/tracked-built-ins/blob/master/addon/-private/decorator.ts#L40
Gheric Speiginer commented
Oh, I guess the parameters in the actual implementation are not actually included (in the generated declarations). I'll open a PR