[I] ResolveModuleHost
File-system operations needed to resolve package and file specifiers without loading their code.
Methods
Section titled “Methods”readFile()
Section titled “readFile()”readFile(path): Promise<string>;Read a utf-8 encoded file.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
path | string |
Returns
Section titled “Returns”Promise<string>
realpath()
Section titled “realpath()”realpath(path): Promise<string>;Resolve the real path for the current host.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
path | string |
Returns
Section titled “Returns”Promise<string>
stat()
Section titled “stat()”stat(path): Promise<{ isDirectory: boolean; isFile: boolean;}>;Inspect a path without reading its contents.
The result’s isDirectory() and isFile() predicates distinguish package directories
from candidate entry-point files. Reject with a host error such as ENOENT for a missing path.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
path | string |
Returns
Section titled “Returns”Promise<{
isDirectory: boolean;
isFile: boolean;
}>