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