macro_rules! add_ts_content {
($decl:literal) => { ... };
}Expand description
Adds/appends the given string literal to wasm bindgen typescript bindings.
This is just a sugar for wasm_bindgen typescript_custom_section, so
the given text can be anything, from typescript comment to type declarations
or any other valid .d.ts content.
Example:
ⓘ
// add some custom type to .d.ts bindings output
add_ts_content!("export type SomeType = { field: string; otherField: number };");
// add some comment to .d.ts bindings output
add_ts_content!("// this is some comment");