[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): SourceFileKind | undefined;Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
path | string |
Returns
Section titled “Returns”SourceFileKind | undefined
mkdirp()
Section titled “mkdirp()”mkdirp(path): Promise<string | undefined>;create directory recursively.
Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
path | string | Path to the directory. |
Returns
Section titled “Returns”Promise<string | undefined>
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()
Section titled “stat()”stat(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