@atlaspack/ts-utils 2.14.2-typescript-b27501580.0 → 2.14.2-typescript-5b4d3ad41.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/CompilerHost.d.ts +20 -0
- package/lib/FSHost.d.ts +17 -0
- package/lib/LanguageServiceHost.d.ts +17 -0
- package/lib/ParseConfigHost.d.ts +10 -0
- package/lib/index.d.ts +5 -0
- package/lib/loadTSConfig.d.ts +2 -0
- package/package.json +2 -2
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { FileSystem } from '@atlaspack/fs';
|
|
2
|
+
import type { FilePath, PluginLogger } from '@atlaspack/types';
|
|
3
|
+
import type { CompilerOptions, SourceFile } from 'typescript';
|
|
4
|
+
import { ScriptTarget } from 'typescript';
|
|
5
|
+
import { FSHost } from './FSHost';
|
|
6
|
+
export declare class CompilerHost extends FSHost {
|
|
7
|
+
outputCode: string | null | undefined;
|
|
8
|
+
outputMap: string | null | undefined;
|
|
9
|
+
logger: PluginLogger;
|
|
10
|
+
redirectTypes: Map<FilePath, FilePath>;
|
|
11
|
+
constructor(fs: FileSystem, ts: TypeScriptModule, logger: PluginLogger);
|
|
12
|
+
readFile(filePath: FilePath): undefined | string;
|
|
13
|
+
fileExists(filePath: FilePath): boolean;
|
|
14
|
+
getSourceFile(filePath: FilePath, languageVersion: ScriptTarget[keyof ScriptTarget]): undefined | SourceFile;
|
|
15
|
+
getDefaultLibFileName(options: CompilerOptions): string;
|
|
16
|
+
writeFile(filePath: FilePath, content: string): void;
|
|
17
|
+
getCanonicalFileName(fileName: FilePath): FilePath;
|
|
18
|
+
useCaseSensitiveFileNames(): boolean;
|
|
19
|
+
getNewLine(): string;
|
|
20
|
+
}
|
package/lib/FSHost.d.ts
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { FileSystem } from '@atlaspack/fs';
|
|
2
|
+
import type { FilePath } from '@atlaspack/types';
|
|
3
|
+
export declare class FSHost {
|
|
4
|
+
fs: FileSystem;
|
|
5
|
+
ts: TypeScriptModule;
|
|
6
|
+
constructor(fs: FileSystem, ts: TypeScriptModule);
|
|
7
|
+
getCurrentDirectory: () => FilePath;
|
|
8
|
+
fileExists(filePath: FilePath): boolean;
|
|
9
|
+
readFile(filePath: FilePath): undefined | string;
|
|
10
|
+
directoryExists(filePath: FilePath): boolean;
|
|
11
|
+
realpath(filePath: FilePath): FilePath;
|
|
12
|
+
getAccessibleFileSystemEntries(dirPath: FilePath): {
|
|
13
|
+
directories: Array<FilePath>;
|
|
14
|
+
files: Array<FilePath>;
|
|
15
|
+
};
|
|
16
|
+
readDirectory(root: FilePath, extensions?: ReadonlyArray<string>, excludes?: ReadonlyArray<string>, includes?: ReadonlyArray<string>, depth?: number): any;
|
|
17
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { FileSystem } from '@atlaspack/fs';
|
|
2
|
+
import type { FilePath } from '@atlaspack/types';
|
|
3
|
+
import type { CompilerOptions, LanguageServiceHost as ILanguageServiceHost, IScriptSnapshot, ParsedCommandLine } from 'typescript';
|
|
4
|
+
import { FSHost } from './FSHost';
|
|
5
|
+
export declare class LanguageServiceHost extends FSHost implements ILanguageServiceHost {
|
|
6
|
+
config: ParsedCommandLine;
|
|
7
|
+
files: Partial<Record<FilePath, {
|
|
8
|
+
version: number;
|
|
9
|
+
}>>;
|
|
10
|
+
constructor(fs: FileSystem, ts: TypeScriptModule, config: ParsedCommandLine);
|
|
11
|
+
invalidate(fileName: FilePath): void;
|
|
12
|
+
getScriptFileNames(): Array<string>;
|
|
13
|
+
getScriptVersion(fileName: FilePath): string;
|
|
14
|
+
getScriptSnapshot(fileName: string): IScriptSnapshot | undefined;
|
|
15
|
+
getCompilationSettings(): CompilerOptions;
|
|
16
|
+
getDefaultLibFileName(projectOptions: any): string;
|
|
17
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { FileSystem } from '@atlaspack/fs';
|
|
2
|
+
import type { FilePath } from '@atlaspack/types';
|
|
3
|
+
import type { ParseConfigHost as IParseConfigHost } from 'typescript';
|
|
4
|
+
import { FSHost } from './FSHost';
|
|
5
|
+
export declare class ParseConfigHost extends FSHost implements IParseConfigHost {
|
|
6
|
+
filesRead: Set<FilePath>;
|
|
7
|
+
useCaseSensitiveFileNames: boolean;
|
|
8
|
+
constructor(fs: FileSystem, ts: TypeScriptModule);
|
|
9
|
+
readFile(filePath: FilePath): undefined | string;
|
|
10
|
+
}
|
package/lib/index.d.ts
ADDED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaspack/ts-utils",
|
|
3
|
-
"version": "2.14.2-typescript-
|
|
3
|
+
"version": "2.14.2-typescript-5b4d3ad41.0",
|
|
4
4
|
"license": "(MIT OR Apache-2.0)",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -28,5 +28,5 @@
|
|
|
28
28
|
"scripts": {
|
|
29
29
|
"check-ts": "tsc --emitDeclarationOnly --rootDir src"
|
|
30
30
|
},
|
|
31
|
-
"gitHead": "
|
|
31
|
+
"gitHead": "5b4d3ad41ffa002b989ba77271bb3010a1f05b2a"
|
|
32
32
|
}
|