Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Typescript error with arrow function #79

Open
goldylucks opened this issue Apr 1, 2022 · 0 comments
Open

Typescript error with arrow function #79

goldylucks opened this issue Apr 1, 2022 · 0 comments

Comments

@goldylucks
Copy link

doing this

class Foo {
  @Memoize
  foo = () => "foo"
}

Gives this typescript error

Unable to resolve signature of property decorator when called as an expression.ts(1240)

Decorator function return type is 'void | TypedPropertyDescriptor<unknown>' but is expected to be 'void' or 'any'.
 
Type 'TypedPropertyDescriptor<unknown>' is not assignable to type 'void'.ts(1271)

any workaround?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant