decko icon indicating copy to clipboard operation
decko copied to clipboard

Issues with Typescript

Open vpzomtrrfrt opened this issue 6 years ago • 1 comments

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'.

vpzomtrrfrt avatar Jan 14 '20 02:01 vpzomtrrfrt

Apparently setting target in tsconfig resolves this. Is that an expected requirement, or is this something that can be fixed?

vpzomtrrfrt avatar Jan 14 '20 03:01 vpzomtrrfrt