Skip to content

Exports

[<Class>]
type Exports =
    static member getAsset (key: string, encoding: string) : string
    static member getAsset (key: string) : ArrayBuffer
    static member getAssetAsBlob (key: string, ?options: Options) : Blob
    static member getAssetKeys () : string array
    static member getRawAsset (key: string) : ArrayBuffer
    static member isSea () : bool
AssemblyXantham.Fable.Node
Attributes[<Erase>]

The package's value exports, each bound to its import.

Methods

static member getAsset (key: string, encoding: string) : string

This method can be used to retrieve the assets configured to be bundled into the single-executable application at build time. An error is thrown when no matching asset can be found.

@since v20.12.0

static member getAsset (key: string) : ArrayBuffer

This method can be used to retrieve the assets configured to be bundled into the single-executable application at build time. An error is thrown when no matching asset can be found.

@since v20.12.0

static member getAssetAsBlob (key: string, ?options: Options) : Blob

Similar to sea.getAsset(), but returns the result in a Blob. An error is thrown when no matching asset can be found.

@since v20.12.0

static member getAssetKeys () : string array

This method can be used to retrieve an array of all the keys of assets embedded into the single-executable application. An error is thrown when not running inside a single-executable application.

@since v22.20.0

Returns. An array containing all the keys of the assets embedded in the executable. If no assets are embedded, returns an empty array.

static member getRawAsset (key: string) : ArrayBuffer

This method can be used to retrieve the assets configured to be bundled into the single-executable application at build time. An error is thrown when no matching asset can be found.

Unlike sea.getRawAsset() or sea.getAssetAsBlob(), this method does not return a copy. Instead, it returns the raw asset bundled inside the executable.

For now, users should avoid writing to the returned array buffer. If the injected section is not marked as writable or not aligned properly, writes to the returned array buffer is likely to result in a crash.

@since v20.12.0

static member isSea () : bool

@since v20.12.0

Returns. Whether this script is running inside a single-executable application.