Docs
API Reference
Classes
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()],
})

Implements

Table of contents

Constructors

Methods

Constructors

constructor

new GitLoader()

Methods

canLoad

canLoad(pointer): Promise<boolean>

Parameters

NameType
pointerstring

Returns

Promise<boolean>

Defined in

packages/loaders/git/src/index.ts:52 (opens in a new tab)


canLoadSync

canLoadSync(pointer): boolean

Parameters

NameType
pointerstring

Returns

boolean

Defined in

packages/loaders/git/src/index.ts:56 (opens in a new tab)


load

load(pointer, options): Promise<Source[]>

Parameters

NameType
pointerstring
optionsGitLoaderOptions

Returns

Promise<Source[]>

Implementation of

Loader.load

Defined in

packages/loaders/git/src/index.ts:161 (opens in a new tab)


loadSync

loadSync(pointer, options): Source[]

Parameters

NameType
pointerstring
optionsGitLoaderOptions

Returns

Source[]

Implementation of

Loader.loadSync

Defined in

packages/loaders/git/src/index.ts:232 (opens in a new tab)


resolveGlobs

resolveGlobs(glob, ignores): Promise<string[]>

Parameters

NameType
globstring
ignoresstring[]

Returns

Promise<string[]>

Defined in

packages/loaders/git/src/index.ts:60 (opens in a new tab)


resolveGlobsSync

resolveGlobsSync(glob, ignores): string[]

Parameters

NameType
globstring
ignoresstring[]

Returns

string[]

Defined in

packages/loaders/git/src/index.ts:99 (opens in a new tab)