typedshell 0.1.0

A typed TypeScript subset compiled to standalone Bash or other shell targets
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
use std::error::Error;

use tsh::{CompileOptions, compile_source};

fn main() -> Result<(), Box<dyn Error>> {
    let source = r#"
const name: string = "TypedShell";
echo(`Hello from ${name}`);
"#;

    let script = compile_source("embedded.tsh", source, &CompileOptions::default())?;
    print!("{script}");
    Ok(())
}