write to file tyoescript code example
Example: write in file in typescript
const fs = require("fs");
let text = "Something you want to write in";
fs.writeFileSync("document.txt", text, function(err){
if(err){
return console.log("error");
}
})
const fs = require("fs");
let text = "Something you want to write in";
fs.writeFileSync("document.txt", text, function(err){
if(err){
return console.log("error");
}
})