You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The castArray won't compile against later versions (e.g. 4.1.3) of TypeScript.
I made the changes in utils.ts:
export function castArray<T>(value: T | readonly T[]): readonly T[] {
if (Array.isArray(value)) {
return value;
} else {
const v: T = value as any;
return [v];
}
}
The text was updated successfully, but these errors were encountered:
This is a TypeScript bug: microsoft/TypeScript#41984 We will not be changing castArray as it is correct. Maybe we can set an upper limit to the TypeScript version. Seems like TS is planning to deliver their fix in 4.2.0, highest working version should be 4.1.2
The castArray won't compile against later versions (e.g. 4.1.3) of TypeScript.
I made the changes in utils.ts:
The text was updated successfully, but these errors were encountered: