Expected behaviour
export async function f(this: void, filename: string) {
let text;
if (io !== undefined) {
const f = io.open(filename)[0];
if (f) {
text = f.read("*a");
f.close();
}
} else {
const fs = require('fs');
text = String(fs.readSync())
}
return `file is ${text}!`
}
Then run tstl to get lua and tsc to get js.
Actual behaviour
"types": ["lua-types/5.1", "@types/node"],
Seems to be a conflict.