typescript-svelte-plugin
Advanced tools
Comparing version 0.3.19 to 0.3.20
@@ -599,19 +599,75 @@ "use strict"; | ||
const registry = ts.createDocumentRegistry(); | ||
const originalRegistry = originalLanguageServiceHost.documentRegistry; | ||
const proxyRegistry = { | ||
...originalRegistry, | ||
acquireDocumentWithKey(fileName, tsPath, compilationSettingsOrHost, key, scriptSnapshot, version, scriptKind, sourceFileOptions) { | ||
if (svelte2tsx_1.internalHelpers.isKitFile(fileName, options)) { | ||
return registry.acquireDocumentWithKey(fileName, tsPath, compilationSettingsOrHost, key, scriptSnapshot, version, scriptKind, sourceFileOptions); | ||
} | ||
return originalRegistry.acquireDocumentWithKey(fileName, tsPath, compilationSettingsOrHost, key, scriptSnapshot, version, scriptKind, sourceFileOptions); | ||
}, | ||
updateDocumentWithKey(fileName, tsPath, compilationSettingsOrHost, key, scriptSnapshot, version, scriptKind, sourceFileOptions) { | ||
if (svelte2tsx_1.internalHelpers.isKitFile(fileName, options)) { | ||
return registry.updateDocumentWithKey(fileName, tsPath, compilationSettingsOrHost, key, scriptSnapshot, version, scriptKind, sourceFileOptions); | ||
} | ||
return originalRegistry.updateDocumentWithKey(fileName, tsPath, compilationSettingsOrHost, key, scriptSnapshot, version, scriptKind, sourceFileOptions); | ||
} | ||
}; | ||
return proxyRegistry; | ||
return registry; | ||
// TODO check why this fails on linux and reenable later | ||
// const originalRegistry = (originalLanguageServiceHost as any).documentRegistry; | ||
// const proxyRegistry: ts.DocumentRegistry = { | ||
// ...originalRegistry, | ||
// acquireDocumentWithKey( | ||
// fileName, | ||
// tsPath, | ||
// compilationSettingsOrHost, | ||
// key, | ||
// scriptSnapshot, | ||
// version, | ||
// scriptKind, | ||
// sourceFileOptions | ||
// ) { | ||
// if (internalHelpers.isKitFile(fileName, options)) { | ||
// return registry.acquireDocumentWithKey( | ||
// fileName, | ||
// tsPath, | ||
// compilationSettingsOrHost, | ||
// key, | ||
// scriptSnapshot, | ||
// version, | ||
// scriptKind, | ||
// sourceFileOptions | ||
// ); | ||
// } | ||
// return originalRegistry.acquireDocumentWithKey( | ||
// fileName, | ||
// tsPath, | ||
// compilationSettingsOrHost, | ||
// key, | ||
// scriptSnapshot, | ||
// version, | ||
// scriptKind, | ||
// sourceFileOptions | ||
// ); | ||
// }, | ||
// updateDocumentWithKey( | ||
// fileName, | ||
// tsPath, | ||
// compilationSettingsOrHost, | ||
// key, | ||
// scriptSnapshot, | ||
// version, | ||
// scriptKind, | ||
// sourceFileOptions | ||
// ) { | ||
// if (internalHelpers.isKitFile(fileName, options)) { | ||
// return registry.updateDocumentWithKey( | ||
// fileName, | ||
// tsPath, | ||
// compilationSettingsOrHost, | ||
// key, | ||
// scriptSnapshot, | ||
// version, | ||
// scriptKind, | ||
// sourceFileOptions | ||
// ); | ||
// } | ||
// return originalRegistry.updateDocumentWithKey( | ||
// fileName, | ||
// tsPath, | ||
// compilationSettingsOrHost, | ||
// key, | ||
// scriptSnapshot, | ||
// version, | ||
// scriptKind, | ||
// sourceFileOptions | ||
// ); | ||
// } | ||
// }; | ||
// return proxyRegistry; | ||
} | ||
@@ -618,0 +674,0 @@ function getVirtualLS(fileName, info, ts, logger) { |
{ | ||
"name": "typescript-svelte-plugin", | ||
"version": "0.3.19", | ||
"version": "0.3.20", | ||
"description": "A TypeScript Plugin providing Svelte intellisense", | ||
@@ -5,0 +5,0 @@ "main": "dist/src/index.js", |
136676
3128