Skip to content

Endo API documentation - v0.2.0 / Exports / @endo/bundle-source

Module: @endo/bundle-source

Table of contents

Interfaces

Type Aliases

Functions

Type Aliases

BundleSource

Ƭ BundleSource: BundleSourceSimple & BundleSourceWithFormat & BundleSourceWithOptions & BundleSourceGeneral

Defined in

types.js:15


BundleSourceResult

Ƭ BundleSourceResult<T>: T extends "endoZipBase64" ? { endoZipBase64: string ; endoZipBase64Sha512: string ; moduleFormat: "endoZipBase64" } : T extends "getExport" | "nestedEvaluate" ? { moduleFormat: T ; source: string ; sourceMap: string } : never

Type parameters

NameType
Textends ModuleFormat

Defined in

types.js:28


CanonicalFn

Ƭ CanonicalFn: (location: string) => Promise<string>

Type declaration

▸ (location): Promise<string>

Parameters
NameType
locationstring
Returns

Promise<string>

Defined in

types.js:80


ModuleFormat

Ƭ ModuleFormat: "endoZipBase64" | "nestedEvaluate" | "getExport"

Defined in

types.js:5


ReadFn

Ƭ ReadFn: (location: string) => Promise<Uint8Array>

Type declaration

▸ (location): Promise<Uint8Array>

Parameters
NameType
locationstring
Returns

Promise<Uint8Array>

Defined in

types.js:70

Functions

default

default<T>(startFilename): Promise<BundleSourceResult<T>>

Type parameters

NameType
Textends "endoZipBase64"

Parameters

NameType
startFilenamestring

Returns

Promise<BundleSourceResult<T>>

Defined in

bundle-source.js:7

default<T>(startFilename, format, powers?): Promise<BundleSourceResult<T>>

Type parameters

NameType
Textends ModuleFormat = "endoZipBase64"

Parameters

NameType
startFilenamestring
formatT
powers?Object
powers.canonical?CanonicalFn
powers.externals?string[]
powers.read?ReadFn

Returns

Promise<BundleSourceResult<T>>

Defined in

bundle-source.js:7

default<T>(startFilename, bundleOptions, powers?): Promise<BundleSourceResult<T>>

Type parameters

NameType
Textends ModuleFormat = "endoZipBase64"

Parameters

NameType
startFilenamestring
bundleOptionsBundleOptions<T>
powers?Object
powers.canonical?CanonicalFn
powers.externals?string[]
powers.read?ReadFn

Returns

Promise<BundleSourceResult<T>>

Defined in

bundle-source.js:7

default<T>(startFilename, formatOrOptions?, powers?): Promise<BundleSourceResult<T>>

Type parameters

NameType
Textends ModuleFormat = "endoZipBase64"

Parameters

NameType
startFilenamestring
formatOrOptions?T | BundleOptions<T>
powers?Object
powers.canonical?CanonicalFn
powers.externals?string[]
powers.read?ReadFn

Returns

Promise<BundleSourceResult<T>>

Defined in

bundle-source.js:7