tracked-tools / tracked-built-ins

Tracked versions of JavaScript's built-in classes

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

TS Error: Unable to resolve signature of property decorator when called as an expression.

speigg opened this issue · comments

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;

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.

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.

Oh, I guess the parameters in the actual implementation are not actually included (in the generated declarations). I'll open a PR