@@ -56,12 +56,11 @@ export function {{classname}}FromJSONTyped(json: any, ignoreDiscriminator: boole
5656 if (Array.isArray(json)) {
5757 if (json.every(item => typeof item === ' object' )) {
5858 {{/-first} }
59- if (json.every(item => instanceOf{ {{.} }}(item))) {
60- return json.map(value => {{{.} }}FromJSONTyped(value , true));
59+ if (json.every(item => instanceOf{ {{.} }}(item as object ))) {
60+ return json.map(item => {{{.} }}FromJSONTyped(item , true));
6161 }
6262 { {#-last} }
6363 }
64- return json;
6564 }
6665 { {/-last} }
6766 { {/oneOfArrays} }
@@ -70,15 +69,15 @@ export function {{classname}}FromJSONTyped(json: any, ignoreDiscriminator: boole
7069 { {#items} }
7170 { {#isDateType} }
7271 if (Array.isArray(json)) {
73- if (json.every(item => ! (isNaN(new Date(json ).getTime()))) {
74- return json.map(value => new Date(json );
72+ if (json.every(item => ! (isNaN(new Date(item ).getTime() )))) {
73+ return json.map(item => new Date(item) );
7574 }
7675 }
7776 { {/isDateType} }
7877 { {#isDateTimeType} }
7978 if (Array.isArray(json)) {
80- if (json.every(item => ! (isNaN(new Date(json ).getTime()))) {
81- return json.map(value => new Date(json );
79+ if (json.every(item => ! (isNaN(new Date(item ).getTime() )))) {
80+ return json.map(item => new Date(item) );
8281 }
8382 }
8483 { {/isDateTimeType} }
@@ -161,12 +160,11 @@ export function {{classname}}ToJSONTyped(value?: {{classname}} | null, ignoreDis
161160 if (Array.isArray(value)) {
162161 if (value.every(item => typeof item === ' object' )) {
163162 {{/-first} }
164- if (value.every(item => instanceOf{ {{.} }}(item))) {
165- return value.map(value => {{{.} }}ToJSON(value as { {{.} }}));
163+ if (value.every(item => instanceOf{ {{.} }}(item as object ))) {
164+ return value.map(item => {{{.} }}ToJSON(item as { {{.} }}));
166165 }
167166 { {#-last} }
168167 }
169- return value;
170168 }
171169 { {/-last} }
172170 { {/oneOfArrays} }
@@ -175,15 +173,15 @@ export function {{classname}}ToJSONTyped(value?: {{classname}} | null, ignoreDis
175173 { {#items} }
176174 { {#isDateType} }
177175 if (Array.isArray(value)) {
178- if (value.every(item => item instanceof Date) {
179- return value.map(value => value .toISOString().substring(0,10) ));
176+ if (value.every(item => item instanceof Date)) {
177+ return value.map(item => item .toISOString().substring(0,10));
180178 }
181179 }
182180 { {/isDateType} }
183181 { {#isDateTimeType} }
184182 if (Array.isArray(value)) {
185- if (value.every(item => item instanceof Date) {
186- return value.map(value => value .toISOString();
183+ if (value.every(item => item instanceof Date)) {
184+ return value.map(item => item .toISOString() );
187185 }
188186 }
189187 { {/isDateTimeType} }
0 commit comments