*Need to return dynamic function and execute it

This commit is contained in:
Derrick Hammer 2022-12-15 06:04:24 -05:00
parent 6413d97c61
commit 55fa792bc9
Signed by: pcfreak30
GPG Key ID: C997C339BE476FF2
1 changed files with 1 additions and 1 deletions

View File

@ -15,7 +15,7 @@ import b4a from "b4a";
import type { ClearablePromise } from "p-timeout"; import type { ClearablePromise } from "p-timeout";
async function dImport(pkg: string): Promise<any> { async function dImport(pkg: string): Promise<any> {
return new Function(`return import("${pkg}")`); return new Function(`return import("${pkg}")`)();
} }
let pTimeout: typeof import("p-timeout").default; let pTimeout: typeof import("p-timeout").default;