serializr icon indicating copy to clipboard operation
serializr copied to clipboard

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

Open adamstoffel opened this issue 3 years ago • 0 comments

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 avatar Jan 14 '22 00:01 adamstoffel