Skip to content

Commit

Permalink
Documenting the types bundle use in typegen
Browse files Browse the repository at this point in the history
	modified:   docs/sdk/resources/tools/typegen/generation.mdx
  • Loading branch information
Anton Bernatskiy (kohama) committed Apr 9, 2024
1 parent 7a5a395 commit 5133cda
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions docs/sdk/resources/tools/typegen/generation.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,18 @@ To generate all items defined by a given pallet, set any of the `events`, `calls
}
```

:::info
In the rare cases when the typegen needs a types bundle, supply it alongside metadata:
```json
{
"outDir": "src/types",
"specVersions": "westendVersions.jsonl",
"typesBundle": "westendTypes.json",
...
}
```
:::

## TypeScript wrappers

Wrappers generated by the typegen command can be found in the specified `outDir` (`src/types` by convention). Assuming that this folder is imported as `types` (e.g. with `import * as types from './types'`), you'll be able to find the wrappers at:
Expand Down

0 comments on commit 5133cda

Please sign in to comment.