Skip to content

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.

GenerateOptions

The options for the generate function.

Promise<void>

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',
});