Class: Loader

Hierarchy

  • Loader

Constructors

constructor

+ new Loader(options: LoaderOptions): Loader

Defined in src/fs/loader.ts:20

Parameters:

Name Type
options LoaderOptions

Returns: Loader

Properties

Private contains

contains: function

Defined in src/fs/loader.ts:20

Type declaration:

▸ (root: string, file: string): boolean

Parameters:

Name Type
root string
file string

Private options

options: LoaderOptions

Defined in src/fs/loader.ts:19


shouldLoadRelative

shouldLoadRelative: function

Defined in src/fs/loader.ts:18

Type declaration:

▸ (referencedFile: string): boolean

Parameters:

Name Type
referencedFile string

Methods

candidates

candidates(file: string, dirs: string[], currentFile?: undefined | string, enforceRoot?: undefined | false | true): Generator‹string, void, unknown›

Defined in src/fs/loader.ts:44

Parameters:

Name Type
file string
dirs string[]
currentFile? undefined | string
enforceRoot? undefined | false | true

Returns: Generator‹string, void, unknown›


Private dirname

dirname(path: string): string

Defined in src/fs/loader.ts:68

Parameters:

Name Type
path string

Returns: string


lookup

lookup(file: string, type: LookupType, sync?: undefined | false | true, currentFile?: undefined | string): Generator‹unknown, string, string›

Defined in src/fs/loader.ts:35

Parameters:

Name Type
file string
type LookupType
sync? undefined | false | true
currentFile? undefined | string

Returns: Generator‹unknown, string, string›


Private lookupError

lookupError(file: string, roots: string[]): any

Defined in src/fs/loader.ts:74

Parameters:

Name Type
file string
roots string[]

Returns: any