Skip to content

Documentation / @sw-file-lib/xml / safeParseComponentDefinitionXml

Function: safeParseComponentDefinitionXml() ​

ts
function safeParseComponentDefinitionXml(input: string | Uint8Array<ArrayBuffer>, options?: SchemaParseOptions): Result<ComponentDefinition, SchemaError>;

Defined in: packages/xml/src/schemas/index.ts:64

Parses a Stormworks component definition XML document without throwing schema errors.

Parameters ​

ParameterType
inputstring | Uint8Array<ArrayBuffer>
options?SchemaParseOptions

Returns ​

Result<ComponentDefinition, SchemaError>