parent
1748aeb9c8
commit
52a6da043d
|
@ -30,7 +30,7 @@ export function createNamedArrayType(name: string): typeof Array {
|
||||||
try {
|
try {
|
||||||
// We need to do it this way so that TypeScript does not down-level the below code.
|
// We need to do it this way so that TypeScript does not down-level the below code.
|
||||||
const FunctionConstructor: any = createNamedArrayType.constructor;
|
const FunctionConstructor: any = createNamedArrayType.constructor;
|
||||||
return (new FunctionConstructor('Array', `return class ABC extends Array{}`))(Array);
|
return (new FunctionConstructor('Array', `return class ${name} extends Array{}`))(Array);
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
// If it does not work just give up and fall back to regular Array.
|
// If it does not work just give up and fall back to regular Array.
|
||||||
return Array;
|
return Array;
|
||||||
|
|
Loading…
Reference in New Issue