@volar/typescript
Advanced tools
Comparing version 2.3.5-alpha.2 to 2.4.0-alpha.0
@@ -1,3 +0,6 @@ | ||
import { LanguagePlugin } from '@volar/language-core'; | ||
import { Language, LanguagePlugin } from '@volar/language-core'; | ||
import type * as ts from 'typescript'; | ||
export declare function proxyCreateProgram(ts: typeof import('typescript'), original: typeof ts['createProgram'], getLanguagePlugins: (ts: typeof import('typescript'), options: ts.CreateProgramOptions) => LanguagePlugin<string>[]): typeof import("typescript").createProgram; | ||
export declare function proxyCreateProgram(ts: typeof import('typescript'), original: typeof ts['createProgram'], create: (ts: typeof import('typescript'), options: ts.CreateProgramOptions) => LanguagePlugin<string>[] | { | ||
languagePlugins: LanguagePlugin<string>[]; | ||
setup?(language: Language<string>): void; | ||
}): typeof import("typescript").createProgram; |
@@ -32,3 +32,3 @@ "use strict"; | ||
}; | ||
function proxyCreateProgram(ts, original, getLanguagePlugins) { | ||
function proxyCreateProgram(ts, original, create) { | ||
const sourceFileSnapshots = new language_core_1.FileMap(ts.sys.useCaseSensitiveFileNames); | ||
@@ -51,3 +51,9 @@ const parsedSourceFiles = new WeakMap(); | ||
lastOptions = options; | ||
languagePlugins = getLanguagePlugins(ts, options); | ||
const created = create(ts, options); | ||
if (Array.isArray(created)) { | ||
languagePlugins = created; | ||
} | ||
else { | ||
languagePlugins = created.languagePlugins; | ||
} | ||
language = (0, language_core_1.createLanguage)([ | ||
@@ -84,2 +90,5 @@ ...languagePlugins, | ||
}); | ||
if ('setup' in created) { | ||
created.setup?.(language); | ||
} | ||
} | ||
@@ -86,0 +95,0 @@ const originalHost = options.host; |
import type * as ts from 'typescript'; | ||
import type { LanguagePlugin } from '@volar/language-core'; | ||
export declare let getLanguagePlugins: (ts: typeof import('typescript'), options: ts.CreateProgramOptions) => LanguagePlugin<string>[]; | ||
import type { Language, LanguagePlugin } from '@volar/language-core'; | ||
export declare let getLanguagePlugins: (ts: typeof import('typescript'), options: ts.CreateProgramOptions) => LanguagePlugin<string>[] | { | ||
plugins: LanguagePlugin<string>[]; | ||
setup?(language: Language<string>): void; | ||
}; | ||
export declare function runTsc(tscPath: string, extensions: string[], _getLanguagePlugins: typeof getLanguagePlugins): void; |
{ | ||
"name": "@volar/typescript", | ||
"version": "2.3.5-alpha.2", | ||
"version": "2.4.0-alpha.0", | ||
"license": "MIT", | ||
@@ -15,3 +15,3 @@ "files": [ | ||
"dependencies": { | ||
"@volar/language-core": "2.3.5-alpha.2", | ||
"@volar/language-core": "2.4.0-alpha.0", | ||
"path-browserify": "^1.0.1", | ||
@@ -23,5 +23,5 @@ "vscode-uri": "^3.0.8" | ||
"@types/path-browserify": "latest", | ||
"@volar/language-service": "2.3.5-alpha.2" | ||
"@volar/language-service": "2.4.0-alpha.0" | ||
}, | ||
"gitHead": "875106ba581210ab30829170585205cdb69b73ec" | ||
"gitHead": "007fc74c461e2fd3fb269bf4f3924cc23c35ba56" | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
194343
4118
+ Added@volar/language-core@2.4.0-alpha.0(transitive)
+ Added@volar/source-map@2.4.0-alpha.0(transitive)
- Removed@volar/language-core@2.3.5-alpha.2(transitive)
- Removed@volar/source-map@2.3.5-alpha.2(transitive)