**What?** Refine import syntax for * Importing external TurboScript * Importing JavaScript functions Decouple declare native function from import. **Update** ## Import Cases * ### import from local tbs file ```typescript import {func,class,var} from "./local/module" ``` .tbs will automatically append to import from file * ### import from javascript built-ins ```typescript import {Math} from "javascript" ``` special tbs file where all javascript methods declared. it should be outside library source. * ### import from compiled wasm binary ```typescript import {func,global_var,memory} from "./bin/module.wasm" ``` unwanted functions from imported wasm should be removed and combine in to one wasm output. Notes: All declare syntax outside library source should allocate imports. import from wasm binary need a wasm binary parser. ### import strategy `if library && declare ---> no import` `if declare ---> import`
What?
Refine import syntax for
Decouple declare native function from import.
Update
Import Cases
import from local tbs file
.tbs will automatically append to import from file
import from javascript built-ins
special tbs file where all javascript methods declared. it should be outside library source.
import from compiled wasm binary
unwanted functions from imported wasm should be removed and combine in to one wasm output.
Notes: All declare syntax outside library source should allocate imports. import from wasm binary need a wasm binary parser.
import strategy
if library && declare ---> no importif declare ---> import