Appearance
Export and import scripts / Hm05Script / ImporterDefinition
Interface: ImporterDefinition<O>
Type Parameters
| Type Parameter | Default type |
|---|---|
O | Record<string, any> |
Properties
| Property | Type | Description |
|---|---|---|
accept? | string[] | file types offered when picking the file, e.g. [".txt", ".dat"]; absent = any file |
description? | string | - |
name | string | shown in the Import with Script dialog |
options? | OptionField[] | extra fields in the dialog; their values arrive as options |
version? | string | - |
Methods
run()
ts
run(api, options): void | Promise<void>;reads api.input, builds through api.build. Throw an Error to stop with a message (nothing is imported then).
Parameters
| Parameter | Type |
|---|---|
api | ImportApi |
options | O |
Returns
void | Promise<void>