decko
decko copied to clipboard
Issues with Typescript
Attempting to use bind throws this compilation error:
TS1241: Unable to resolve signature of method decorator when called as an expression.
Type 'TypedPropertyDescriptor<unknown>' is not assignable to type 'void | TypedPropertyDescriptor<(userInfo: Readonly<UserInfo>) => void>'.
Type 'TypedPropertyDescriptor<unknown>' is not assignable to type 'TypedPropertyDescriptor<(userInfo: Readonly<UserInfo>) => void>'.
Types of property 'value' are incompatible.
Type 'unknown' is not assignable to type '((userInfo: Readonly<UserInfo>) => void) | undefined'.
Type 'unknown' is not assignable to type '(userInfo: Readonly<UserInfo>) => void'.
Apparently setting target in tsconfig resolves this. Is that an expected requirement, or is this something that can be fixed?