Skip to content

Latest commit

 

History

History
 
 

add-jsdoc-to-wasm

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Example: Add (JSDoc)

Uses: @esmbly/transformer-jsdoc, @esmbly-transformer-wasm

Summary

This example shows how a simple JavaScript program with JSDoc comments can be transform to TypeScript, AssemblyScript, Wat and WebAssembly by chaining @esmbly/transformer-jsdoc and @esmbly-transformer-wasm.

# Input (JavaScript with JSDoc comments)
src/add.js

# Output (TypeScript, AssemblyScript, Wat and WebAssembly)
dist/add.ts
dist/add.as.ts
dist/add.wat
dist/add.wasm

Transforming the example

yarn run esmbly run

Running the tests

yarn test