/// import * as fs from 'fs'; require("./editor/deploy") declare namespace pxt.editor { function deployCoreAsync(resp: pxtc.CompileResult, disconnect?: boolean): Promise; } export function deployCoreAsync(resp: pxtc.CompileResult) { return pxt.editor.deployCoreAsync(resp, process.env["PXT_SERIAL"] ? false : true) .then(() => { fs.writeFileSync("built/full-" + pxtc.BINARY_UF2, resp.outfiles[pxtc.BINARY_UF2], { encoding: "base64" }) }) }