It would be cool if there's a way to directly use native languages in typescript!
Take rust as an example ( as it's also using LLVM, it would probably be easier to implement )
// main.ts
import { read_file } from "./config.rs"
function main(){
let config = read_file('./config.ini').value;
}
// config.rs
use std::fs::File;
use std::io::prelude::*;
use std::io::Error;
fn read_file(path: &str) -> Result<String, Error> {
let mut file = File::open(path)?;
let mut contents = String::new();
file.read_to_string(&mut contents)?;
Ok(contents)
}
This would not only bring the great stdlib and other libraries of the language to this TSC but also take advantage of the language's strong points!
It would be cool if there's a way to directly use native languages in typescript!
Take rust as an example ( as it's also using LLVM, it would probably be easier to implement )
This would not only bring the great stdlib and other libraries of the language to this TSC but also take advantage of the language's strong points!