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

Constructor parameter decorators do not work in TypeScript due to invalid function type for "serializable" #159

Open
adamstoffel opened this issue Jan 14, 2022 · 0 comments

Comments

@adamstoffel
Copy link

Attempting to use the @serializable decorator on a constructor parameter fails TS typechecking.
image

An additional type overload is necessary:

export function serializable(
    propSchema: PropSchema
): (target: Object, key: string, parameterIndex: number) => void;
@adamstoffel adamstoffel changed the title Constructor argument decorators do not work in TypeScript due to invalid function type for "serializable" Constructor parameter decorators do not work in TypeScript due to invalid function type for "serializable" Jan 14, 2022
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