my-bitburner/src/repl.ts
2022-08-22 14:23:34 +09:00

11 lines
No EOL
255 B
TypeScript

import { NS } from '@ns'
export async function main(ns: NS) : Promise<void> {
const cmd = ns.args.join(" ");
// @ts-ignore: disable-next-line
const fn = new Function(["ns"],cmd);
const v = await fn(ns);
if(v !== undefined){
ns.tprint(v)
}
}