typescript-svelte-plugin 0.3.41 → 0.3.42
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.
|
@@ -2,6 +2,17 @@ import type ts from 'typescript/lib/tsserverlibrary';
|
|
|
2
2
|
import { Logger } from '../logger';
|
|
3
3
|
import { InternalHelpers } from 'svelte2tsx';
|
|
4
4
|
type _ts = typeof ts;
|
|
5
|
+
declare module 'typescript/lib/tsserverlibrary' {
|
|
6
|
+
interface LanguageServiceHost {
|
|
7
|
+
/** @internal */ getCachedExportInfoMap?(): unknown;
|
|
8
|
+
/** @internal */ getModuleSpecifierCache?(): unknown;
|
|
9
|
+
/** @internal */ getGlobalTypingsCacheLocation?(): string | undefined;
|
|
10
|
+
/** @internal */ getSymlinkCache?(files: readonly ts.SourceFile[]): unknown;
|
|
11
|
+
/** @internal */ getPackageJsonsVisibleToFile?(fileName: string, rootDir?: string): readonly unknown[];
|
|
12
|
+
/** @internal */ getPackageJsonAutoImportProvider?(): ts.Program | undefined;
|
|
13
|
+
/** @internal*/ getModuleResolutionCache?(): ts.ModuleResolutionCache;
|
|
14
|
+
}
|
|
15
|
+
}
|
|
5
16
|
export declare const kitExports: Record<string, {
|
|
6
17
|
displayParts: ts.SymbolDisplayPart[];
|
|
7
18
|
documentation: ts.SymbolDisplayPart[];
|
|
@@ -209,13 +209,13 @@ exports.kitExports = {
|
|
|
209
209
|
kind: 'punctuation'
|
|
210
210
|
},
|
|
211
211
|
{
|
|
212
|
-
text: "'
|
|
212
|
+
text: "'never' | 'always' | 'ignore'",
|
|
213
213
|
kind: 'stringLiteral'
|
|
214
214
|
}
|
|
215
215
|
],
|
|
216
216
|
documentation: [
|
|
217
217
|
{
|
|
218
|
-
text: 'Control how SvelteKit should handle
|
|
218
|
+
text: 'Control how SvelteKit should handle trailing slashes in the URL. More info: https://kit.svelte.dev/docs/page-options#trailingslash',
|
|
219
219
|
kind: 'text'
|
|
220
220
|
}
|
|
221
221
|
]
|
|
@@ -536,6 +536,37 @@ function getProxiedLanguageService(info, ts, logger) {
|
|
|
536
536
|
this.realpath = originalLanguageServiceHost.realpath
|
|
537
537
|
? (...args) => originalLanguageServiceHost.realpath(...args)
|
|
538
538
|
: undefined;
|
|
539
|
+
this.getProjectReferences = originalLanguageServiceHost.getProjectReferences
|
|
540
|
+
? () => originalLanguageServiceHost.getProjectReferences()
|
|
541
|
+
: undefined;
|
|
542
|
+
this.getParsedCommandLine = originalLanguageServiceHost.getParsedCommandLine
|
|
543
|
+
? (fileName) => originalLanguageServiceHost.getParsedCommandLine(fileName)
|
|
544
|
+
: undefined;
|
|
545
|
+
this.getCachedExportInfoMap = originalLanguageServiceHost.getCachedExportInfoMap
|
|
546
|
+
? () => originalLanguageServiceHost.getCachedExportInfoMap()
|
|
547
|
+
: undefined;
|
|
548
|
+
this.getModuleSpecifierCache = originalLanguageServiceHost.getModuleSpecifierCache
|
|
549
|
+
? () => originalLanguageServiceHost.getModuleSpecifierCache()
|
|
550
|
+
: undefined;
|
|
551
|
+
this.getGlobalTypingsCacheLocation = originalLanguageServiceHost.getGlobalTypingsCacheLocation
|
|
552
|
+
? () => originalLanguageServiceHost.getGlobalTypingsCacheLocation()
|
|
553
|
+
: undefined;
|
|
554
|
+
this.getSymlinkCache = originalLanguageServiceHost.getSymlinkCache
|
|
555
|
+
? (...args) => originalLanguageServiceHost.getSymlinkCache(
|
|
556
|
+
// @ts-ignore
|
|
557
|
+
...args)
|
|
558
|
+
: undefined;
|
|
559
|
+
this.getPackageJsonsVisibleToFile = originalLanguageServiceHost.getPackageJsonsVisibleToFile
|
|
560
|
+
? (...args) => originalLanguageServiceHost.getPackageJsonsVisibleToFile(
|
|
561
|
+
// @ts-ignore
|
|
562
|
+
...args)
|
|
563
|
+
: undefined;
|
|
564
|
+
this.getPackageJsonAutoImportProvider = originalLanguageServiceHost.getPackageJsonAutoImportProvider
|
|
565
|
+
? () => originalLanguageServiceHost.getPackageJsonAutoImportProvider()
|
|
566
|
+
: undefined;
|
|
567
|
+
this.getModuleResolutionCache = originalLanguageServiceHost.getModuleResolutionCache
|
|
568
|
+
? () => originalLanguageServiceHost.getModuleResolutionCache()
|
|
569
|
+
: undefined;
|
|
539
570
|
// This never worked due to configPath being the wrong format and due to https://github.com/microsoft/TypeScript/issues/43329 .
|
|
540
571
|
// Noone has complained about this not working, so this is commented out for now, revisit if it ever comes up.
|
|
541
572
|
// const configPath = info.project.getCurrentDirectory() + '/svelte.config.js';
|