loaders_git_src.gitloader

Class: GitLoader#

loaders/git/src.GitLoader

This loader loads a file from git.

const typeDefs = await loadTypedefs('git:someBranch:some/path/to/file.js', {
loaders: [new GitLoader()],
})

Hierarchy#

  • GitLoader

Implements#

Table of contents#

Constructors#

Methods#

Constructors#

constructor#

+ new GitLoader(): GitLoader

Returns: GitLoader

Methods#

canLoad#

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

Parameters:#

NameType
pointerstring

Returns: Promise<boolean\>

Defined in: packages/loaders/git/src/index.ts:54


canLoadSync#

canLoadSync(pointer: string): boolean

Parameters:#

NameType
pointerstring

Returns: boolean

Defined in: packages/loaders/git/src/index.ts:58


load#

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

Parameters:#

NameType
pointerstring
optionsGitLoaderOptions

Returns: Promise<Source\>

Defined in: packages/loaders/git/src/index.ts:62


loadSync#

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

Parameters:#

NameType
pointerstring
optionsGitLoaderOptions

Returns: Source

Defined in: packages/loaders/git/src/index.ts:79


loaderId#

loaderId(): string

Returns: string

Defined in: packages/loaders/git/src/index.ts:50