loaders_module_src.moduleloader

Class: ModuleLoader#

loaders/module/src.ModuleLoader

  • This loader loads documents and type definitions from a Node module
const schema = await loadSchema('module:someModuleName#someNamedExport', {
loaders: [new ModuleLoader()],
})

Hierarchy#

  • ModuleLoader

Implements#

Table of contents#

Constructors#

Methods#

Constructors#

constructor#

+ new ModuleLoader(): ModuleLoader

Returns: ModuleLoader

Methods#

canLoad#

canLoad(pointer: string): Promise<boolean\>

Parameters:#

NameType
pointerstring

Returns: Promise<boolean\>

Defined in: packages/loaders/module/src/index.ts:47


canLoadSync#

canLoadSync(pointer: string): boolean

Parameters:#

NameType
pointerstring

Returns: boolean

Defined in: packages/loaders/module/src/index.ts:51


load#

load(pointer: string, options: SingleFileOptions): Promise<Source\>

Parameters:#

NameType
pointerstring
optionsSingleFileOptions

Returns: Promise<Source\>

Defined in: packages/loaders/module/src/index.ts:55


loadSync#

loadSync(pointer: string, options: SingleFileOptions): Source

Parameters:#

NameType
pointerstring
optionsSingleFileOptions

Returns: Source

Defined in: packages/loaders/module/src/index.ts:69


loaderId#

loaderId(): string

Returns: string

Defined in: packages/loaders/module/src/index.ts:43