-
Notifications
You must be signed in to change notification settings - Fork 55
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
error TS2345 #37
Comments
try this. using |
I got the same error, also when using |
It's definitely the |
I'm having the same problem caused by 133:48 Argument of type '(new () => {}) | undefined' is not assignable to parameter of type 'new () => {}'.
Type 'undefined' is not assignable to type 'new () => {}'.
131 | if (innerJson && isArrayOrArrayClass(innerJson)) {
132 | return innerJson.map(
> 133 | (item: any) => deserialize(metadata.clazz, item)
| ^
134 | );
135 | }
136 | return;
163:9 Type 'undefined' is not assignable to type 'T'.
if (hasAnyNullOrUndefined(Clazz, json)) {
> 163 | return void 0;
| ^
164 | }
170:9 Type 'undefined' is not assignable to type 'T'.
if (!isTargetType(json, 'object')) {
> 170 | return void 0;
| ^
171 | } All the errors result from I have configured tslint to exclude node_modules folder, but for some reason it parses just this package, so it might be some bug in TS also? I can also confirm that setting |
I get this error when running code using the deserialize method. Why?
(133,48): error TS2345: Argument of type '(new () => {}) | undefined' is not assignable to parameter of type 'new () => {}'.
Type 'undefined' is not assignable to type 'new () => {}'.
The text was updated successfully, but these errors were encountered: