mirror of
https://github.com/fluencelabs/wasm-bindgen
synced 2025-06-13 04:51:23 +00:00
Add TS type for init fn
This commit is contained in:
@ -11,6 +11,13 @@ cargo run -p wasm-bindgen-cli --bin wasm-bindgen -- \
|
||||
--out-dir pkg \
|
||||
--typescript
|
||||
|
||||
mkdir pkg/web
|
||||
cargo run -p wasm-bindgen-cli --bin wasm-bindgen -- \
|
||||
../../target/wasm32-unknown-unknown/debug/typescript_tests.wasm \
|
||||
--out-dir pkg/web \
|
||||
--target web \
|
||||
--typescript
|
||||
|
||||
if [ ! -d node_modules ]; then
|
||||
npm install
|
||||
fi
|
||||
|
3
crates/typescript-tests/src/web/init.ts
Normal file
3
crates/typescript-tests/src/web/init.ts
Normal file
@ -0,0 +1,3 @@
|
||||
import * as wbg from '../../pkg/web/typescript_tests';
|
||||
|
||||
const init: Promise<any> = wbg.init('.');
|
@ -9,6 +9,6 @@
|
||||
"baseUrl": "."
|
||||
},
|
||||
"include": [
|
||||
"src/*.ts"
|
||||
"src/**/*.ts"
|
||||
]
|
||||
}
|
||||
|
Reference in New Issue
Block a user