my-bitburner/updateDefs.js

19 lines
491 B
JavaScript
Raw Permalink Normal View History

2021-12-24 03:39:59 +09:00
const https = require("https")
2021-12-24 03:21:18 +09:00
const fs = require("fs")
const url = 'https://raw.githubusercontent.com/danielyxie/bitburner/dev/src/ScriptEditor/NetscriptDefinitions.d.ts'
const path = './NetscriptDefinitions.d.ts'
https.get(url, (res) => {
const file = fs.createWriteStream(path)
res.pipe(file)
file.on('finish', () => {
file.close
console.log('Netscript Type Definitions Updated')
})
}).on("error", (err) => {
console.log("Error: ", err.message)
})