Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@volar/typescript

Package Overview
Dependencies
Maintainers
0
Versions
222
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@volar/typescript - npm Package Compare versions

Comparing version 2.3.5-alpha.1 to 2.3.5-alpha.2

47

index.d.ts

@@ -0,1 +1,2 @@

export * from './lib/common';
export * from './lib/node/decorateLanguageService';

@@ -7,2 +8,46 @@ export * from './lib/node/decorateLanguageServiceHost';

export * from './lib/protocol/createSys';
export * from './lib/common';
import type { VirtualCode } from '@volar/language-core';
import type * as ts from 'typescript';
declare module '@volar/language-core' {
interface Language<T> {
typescript?: {
configFileName: string | undefined;
sys: ts.System & {
version?: number;
sync?(): Promise<number>;
};
languageServiceHost: ts.LanguageServiceHost;
getExtraServiceScript(fileName: string): TypeScriptExtraServiceScript | undefined;
asScriptId(fileName: string): T;
asFileName(scriptId: T): string;
};
}
interface LanguagePlugin<T = unknown, K extends VirtualCode = VirtualCode> {
typescript?: TypeScriptGenericOptions<K> & TypeScriptNonTSPluginOptions<K>;
}
}
/**
* The following options available to all situations.
*/
interface TypeScriptGenericOptions<K> {
extraFileExtensions: ts.FileExtensionInfo[];
resolveHiddenExtensions?: boolean;
getServiceScript(root: K): TypeScriptServiceScript | undefined;
}
/**
* The following options will not be available in TS plugin.
*/
interface TypeScriptNonTSPluginOptions<K> {
getExtraServiceScripts?(fileName: string, rootVirtualCode: K): TypeScriptExtraServiceScript[];
resolveLanguageServiceHost?(host: ts.LanguageServiceHost): ts.LanguageServiceHost;
}
export interface TypeScriptServiceScript {
code: VirtualCode;
extension: '.ts' | '.js' | '.mts' | '.mjs' | '.cjs' | '.cts' | '.d.ts' | string;
scriptKind: ts.ScriptKind;
/** See #188 */
preventLeadingOffset?: boolean;
}
export interface TypeScriptExtraServiceScript extends TypeScriptServiceScript {
fileName: string;
}

2

index.js

@@ -17,2 +17,3 @@ "use strict";

Object.defineProperty(exports, "__esModule", { value: true });
__exportStar(require("./lib/common"), exports);
__exportStar(require("./lib/node/decorateLanguageService"), exports);

@@ -24,3 +25,2 @@ __exportStar(require("./lib/node/decorateLanguageServiceHost"), exports);

__exportStar(require("./lib/protocol/createSys"), exports);
__exportStar(require("./lib/common"), exports);
//# sourceMappingURL=index.js.map

@@ -1,4 +0,5 @@

import type { CodeInformation, SourceScript, TypeScriptServiceScript } from '@volar/language-core';
import type { CodeInformation, SourceScript } from '@volar/language-core';
import { Language } from '@volar/language-core';
import type * as ts from 'typescript';
import type { TypeScriptServiceScript } from '../..';
export declare function transformCallHierarchyItem(language: Language<string>, item: ts.CallHierarchyItem, filter: (data: CodeInformation) => boolean): ts.CallHierarchyItem;

@@ -5,0 +6,0 @@ export declare function transformDiagnostic<T extends ts.Diagnostic>(language: Language<string>, diagnostic: T, program: ts.Program | undefined, isTsc: boolean): T | undefined;

@@ -1,2 +0,3 @@

import type { Language, SourceScript, TypeScriptServiceScript } from '@volar/language-core';
import type { Language, SourceScript } from '@volar/language-core';
import type { TypeScriptServiceScript } from '../..';
export declare function getServiceScript(language: Language<string>, fileName: string): [serviceScript: TypeScriptServiceScript, targetScript: SourceScript<string>, sourceScript: SourceScript<string>] | [serviceScript: undefined, sourceScript: SourceScript<string>, sourceScript: SourceScript<string>] | [serviceScript: undefined, sourceScript: undefined, targetScript: undefined];

@@ -1,3 +0,4 @@

import { Language, TypeScriptExtraServiceScript } from '@volar/language-core';
import { Language } from '@volar/language-core';
import type * as ts from 'typescript';
import type { TypeScriptExtraServiceScript } from '../..';
import type { createSys } from './createSys';

@@ -4,0 +5,0 @@ export interface TypeScriptProjectHost extends Pick<ts.LanguageServiceHost, 'getLocalizedDiagnosticMessages' | 'getCurrentDirectory' | 'getCompilationSettings' | 'getProjectReferences' | 'getScriptFileNames' | 'getProjectVersion' | 'getScriptSnapshot'> {

{
"name": "@volar/typescript",
"version": "2.3.5-alpha.1",
"version": "2.3.5-alpha.2",
"license": "MIT",

@@ -15,3 +15,3 @@ "files": [

"dependencies": {
"@volar/language-core": "2.3.5-alpha.1",
"@volar/language-core": "2.3.5-alpha.2",
"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.1"
"@volar/language-service": "2.3.5-alpha.2"
},
"gitHead": "111bfae316c66a087a497e12740d46fc2c74cab0"
"gitHead": "875106ba581210ab30829170585205cdb69b73ec"
}
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc