TS Error: Unable to resolve signature of property decorator when called as an expression.
speigg opened this issue · 4 comments
speigg 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;
pzuraq 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.
speigg 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.
pzuraq commented
This line is probably the incorrect one: https://github.com/pzuraq/tracked-built-ins/blob/master/addon/-private/decorator.ts#L40
speigg commented
Oh, I guess the parameters in the actual implementation are not actually included (in the generated declarations). I'll open a PR