generate
generate(
options
):Promise
<void
>
Defined in: core/generate/index.ts:80
Generates the bindings for a .did
file.
For an explanation of the generated files, see the Bindings Structure docs page.
Parameters
Section titled “Parameters”options
Section titled “options”The options for the generate function.
Returns
Section titled “Returns”Promise
<void
>
Example
Section titled “Example”Suppose we have a .did
file in ./canisters/hello_world.did
and we want to generate bindings in ./src/bindings
.
await generate({ didFile: './canisters/hello_world.did', outDir: './src/bindings',});