[I] CompilerHost
Extends
Section titled âExtendsâSystemHost
Properties
Section titled âPropertiesâ| Property | Type | Description |
|---|---|---|
logSink | LogSink | - |
parseCache? | WeakMap<SourceFile, TypeSpecScriptNode> | Optional cache to reuse the results of parsing and binding across programs. |
Methods
Section titled âMethodsâfileURLToPath()
Section titled âfileURLToPath()âfileURLToPath(url): string;Parameters
Section titled âParametersâ| Parameter | Type |
|---|---|
url | string |
Returns
Section titled âReturnsâstring
getExecutionRoot()
Section titled âgetExecutionRoot()âgetExecutionRoot(): string;Returns
Section titled âReturnsâstring
getJsImport()
Section titled âgetJsImport()âgetJsImport(path): Promise<Record<string, any>>;Parameters
Section titled âParametersâ| Parameter | Type |
|---|---|
path | string |
Returns
Section titled âReturnsâPromise<Record<string, any>>
getLibDirs()
Section titled âgetLibDirs()âgetLibDirs(): string[];Returns
Section titled âReturnsâstring[]
getSourceFileKind()
Section titled âgetSourceFileKind()âgetSourceFileKind(path): undefined | SourceFileKind;Parameters
Section titled âParametersâ| Parameter | Type |
|---|---|
path | string |
Returns
Section titled âReturnsâundefined | SourceFileKind
mkdirp()
Section titled âmkdirp()âmkdirp(path): Promise<undefined | string>;create directory recursively.
Parameters
Section titled âParametersâ| Parameter | Type | Description |
|---|---|---|
path | string | Path to the directory. |
Returns
Section titled âReturnsâPromise<undefined | string>
Inherited from
Section titled âInherited fromâSystemHost.mkdirppathToFileURL()
Section titled âpathToFileURL()âpathToFileURL(path): string;Parameters
Section titled âParametersâ| Parameter | Type |
|---|---|
path | string |
Returns
Section titled âReturnsâstring
readDir()
Section titled âreadDir()âreadDir(path): Promise<string[]>;Read directory.
Parameters
Section titled âParametersâ| Parameter | Type | Description |
|---|---|---|
path | string | Path to the directory. |
Returns
Section titled âReturnsâPromise<string[]>
list of file/directory in the given directory. Returns the name not the full path.
Inherited from
Section titled âInherited fromâSystemHost.readDirreadFile()
Section titled âreadFile()âreadFile(path): Promise<SourceFile>;read a utf-8 or utf-8 with bom encoded file
Parameters
Section titled âParametersâ| Parameter | Type |
|---|---|
path | string |
Returns
Section titled âReturnsâPromise<SourceFile>
Inherited from
Section titled âInherited fromâSystemHost.readFilereadUrl()
Section titled âreadUrl()âreadUrl(url): Promise<SourceFile>;read a file at the given url.
Parameters
Section titled âParametersâ| Parameter | Type |
|---|---|
url | string |
Returns
Section titled âReturnsâPromise<SourceFile>
Inherited from
Section titled âInherited fromâSystemHost.readUrlrealpath()
Section titled ârealpath()ârealpath(path): Promise<string>;Parameters
Section titled âParametersâ| Parameter | Type |
|---|---|
path | string |
Returns
Section titled âReturnsâPromise<string>
Inherited from
Section titled âInherited fromâSystemHost.realpathrm(path, options?): Promise<void>;Deletes a directory or file.
Parameters
Section titled âParametersâ| Parameter | Type | Description |
|---|---|---|
path | string | Path to the directory or file. |
options? | RmOptions | - |
Returns
Section titled âReturnsâPromise<void>
Inherited from
Section titled âInherited fromâSystemHost.rmstat(path): Promise<{ isDirectory: boolean; isFile: boolean;}>;Parameters
Section titled âParametersâ| Parameter | Type |
|---|---|
path | string |
Returns
Section titled âReturnsâPromise<{
isDirectory: boolean;
isFile: boolean;
}>
Inherited from
Section titled âInherited fromâSystemHost.statwriteFile()
Section titled âwriteFile()âwriteFile(path, content): Promise<void>;Write the file.
Parameters
Section titled âParametersâ| Parameter | Type | Description |
|---|---|---|
path | string | Path to the file. |
content | string | Content of the file. |
Returns
Section titled âReturnsâPromise<void>
Inherited from
Section titled âInherited fromâSystemHost.writeFile