Skip to content

Configuring a project

dcodeIO edited this page Mar 2, 2018 · 3 revisions

Placing a tsconfig.json with the following contents next to your AssemblyScript sources (ideally in their own directory) will import all relevant types and configuration options. Note that the actual paths may vary depending on your actual setup.

Targeting WebAssembly only with asc

{
  "extends": "./node_modules/assemblyscript/std/assembly.json",
  "include": [
    "./**/*.ts"
  ]
}

Alternatively, std/assembly.d.ts can be referenced (does not inherit other important configuration settings).

Targeting both WebAssembly with asc and JavaScript with tsc

See also: Writing portable code

{
  "extends": "./node_modules/assemblyscript/std/portable.json",
  "include": [
    "./**/*.ts"
  ]
}

Alternatively, std/portable.d.ts can be referenced (does not inherit other important configuration settings).

 

Clone this wiki locally