volar-service-typescript 0.0.12 → 0.0.14

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.
Files changed (42) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +25 -0
  3. package/out/configs/getFormatCodeSettings.d.ts +1 -0
  4. package/out/configs/getUserPreferences.d.ts +1 -0
  5. package/out/features/callHierarchy.d.ts +1 -0
  6. package/out/features/codeAction.d.ts +1 -0
  7. package/out/features/codeActionResolve.d.ts +1 -0
  8. package/out/features/completions/basic.d.ts +1 -0
  9. package/out/features/completions/directiveComment.d.ts +1 -0
  10. package/out/features/completions/jsDoc.d.ts +1 -0
  11. package/out/features/completions/resolve.d.ts +1 -0
  12. package/out/features/definition.d.ts +1 -0
  13. package/out/features/diagnostics.d.ts +1 -0
  14. package/out/features/documentHighlight.d.ts +1 -0
  15. package/out/features/documentSymbol.d.ts +1 -0
  16. package/out/features/fileReferences.d.ts +1 -0
  17. package/out/features/fileRename.d.ts +1 -0
  18. package/out/features/foldingRanges.d.ts +1 -0
  19. package/out/features/formatting.d.ts +1 -0
  20. package/out/features/hover.d.ts +1 -0
  21. package/out/features/implementation.d.ts +1 -0
  22. package/out/features/inlayHints.d.ts +1 -0
  23. package/out/features/prepareRename.d.ts +1 -0
  24. package/out/features/references.d.ts +1 -0
  25. package/out/features/rename.d.ts +1 -0
  26. package/out/features/selectionRanges.d.ts +1 -0
  27. package/out/features/semanticTokens.d.ts +1 -0
  28. package/out/features/signatureHelp.d.ts +1 -0
  29. package/out/features/typeDefinition.d.ts +1 -0
  30. package/out/features/workspaceSymbol.d.ts +1 -0
  31. package/out/index.d.ts +1 -0
  32. package/out/protocol.const.d.ts +1 -0
  33. package/out/shared.d.ts +1 -0
  34. package/out/types.d.ts +1 -0
  35. package/out/utils/errorCodes.d.ts +1 -0
  36. package/out/utils/fixNames.d.ts +1 -0
  37. package/out/utils/modifiers.d.ts +1 -0
  38. package/out/utils/previewer.d.ts +1 -0
  39. package/out/utils/snippetForFunctionCall.d.ts +1 -0
  40. package/out/utils/transforms.d.ts +1 -0
  41. package/out/utils/typeConverters.d.ts +1 -0
  42. package/package.json +18 -6
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2022-present Johnson Chu
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,25 @@
1
+ # volar-service-typescript
2
+
3
+ Volar plugin for [TypeScript](https://www.typescriptlang.org/).
4
+
5
+ ## Installation
6
+
7
+ ```sh
8
+ npm install volar-service-typescript
9
+ ```
10
+
11
+ ## Usage
12
+
13
+ `volar.config.js`
14
+
15
+ ```js
16
+ module.exports = {
17
+ services: [
18
+ require('volar-service-typescript').create(),
19
+ ],
20
+ };
21
+ ```
22
+
23
+ ## License
24
+
25
+ [MIT](LICENSE) © [Johnson Chu](https://github.com/johnsoncodehk)
@@ -3,3 +3,4 @@ import type * as ts from 'typescript/lib/tsserverlibrary';
3
3
  import type { FormattingOptions } from '@volar/language-service';
4
4
  import type { TextDocument } from 'vscode-languageserver-textdocument';
5
5
  export declare function getFormatCodeSettings(ctx: SharedContext, document: TextDocument, options?: FormattingOptions): Promise<ts.FormatCodeSettings>;
6
+ //# sourceMappingURL=getFormatCodeSettings.d.ts.map
@@ -2,3 +2,4 @@ import type * as ts from 'typescript/lib/tsserverlibrary';
2
2
  import { SharedContext } from '../types';
3
3
  import type { TextDocument } from 'vscode-languageserver-textdocument';
4
4
  export declare function getUserPreferences(ctx: SharedContext, document: TextDocument): Promise<ts.UserPreferences>;
5
+ //# sourceMappingURL=getUserPreferences.d.ts.map
@@ -5,3 +5,4 @@ export declare function register(ctx: SharedContext): {
5
5
  getIncomingCalls: (item: vscode.CallHierarchyItem) => vscode.CallHierarchyIncomingCall[];
6
6
  getOutgoingCalls: (item: vscode.CallHierarchyItem) => vscode.CallHierarchyOutgoingCall[];
7
7
  };
8
+ //# sourceMappingURL=callHierarchy.d.ts.map
@@ -24,3 +24,4 @@ export interface OrganizeImportsData {
24
24
  }
25
25
  export type Data = FixAllData | RefactorData | OrganizeImportsData;
26
26
  export declare function register(ctx: SharedContext): (uri: string, range: vscode.Range, context: vscode.CodeActionContext) => Promise<vscode.CodeAction[] | undefined>;
27
+ //# sourceMappingURL=codeAction.d.ts.map
@@ -7,3 +7,4 @@ export declare function register(ctx: SharedContext): (codeAction: vscode.CodeAc
7
7
  export declare function resolveFixAllCodeAction(ctx: SharedContext, codeAction: vscode.CodeAction, data: FixAllData, formatOptions: ts.FormatCodeSettings, preferences: ts.UserPreferences): void;
8
8
  export declare function resolveRefactorCodeAction(ctx: SharedContext, codeAction: vscode.CodeAction, data: RefactorData, document: TextDocument, formatOptions: ts.FormatCodeSettings, preferences: ts.UserPreferences): void;
9
9
  export declare function resolveOrganizeImportsCodeAction(ctx: SharedContext, codeAction: vscode.CodeAction, data: Data, formatOptions: ts.FormatCodeSettings, preferences: ts.UserPreferences): void;
10
+ //# sourceMappingURL=codeActionResolve.d.ts.map
@@ -14,3 +14,4 @@ export interface Data {
14
14
  }
15
15
  export declare function register(ctx: SharedContext): (uri: string, position: vscode.Position, options?: ts.GetCompletionsAtPositionOptions | undefined) => Promise<vscode.CompletionList | undefined>;
16
16
  export declare function handleKindModifiers(item: vscode.CompletionItem, tsEntry: ts.CompletionEntry | ts.CompletionEntryDetails): void;
17
+ //# sourceMappingURL=basic.d.ts.map
@@ -1,3 +1,4 @@
1
1
  import type * as vscode from '@volar/language-service';
2
2
  import { SharedContext } from '../../types';
3
3
  export declare function register(ctx: SharedContext): (uri: string, position: vscode.Position) => vscode.CompletionItem[] | undefined;
4
+ //# sourceMappingURL=directiveComment.d.ts.map
@@ -1,3 +1,4 @@
1
1
  import { SharedContext } from '../../types';
2
2
  import type * as vscode from '@volar/language-service';
3
3
  export declare function register(ctx: SharedContext): (uri: string, position: vscode.Position) => vscode.CompletionItem | undefined;
4
+ //# sourceMappingURL=jsDoc.d.ts.map
@@ -3,3 +3,4 @@ import type * as vscode from '@volar/language-service';
3
3
  import type { TextDocument } from 'vscode-languageserver-textdocument';
4
4
  export declare function register(ctx: SharedContext): (item: vscode.CompletionItem, newPosition?: vscode.Position) => Promise<vscode.CompletionItem>;
5
5
  export declare function getLineText(document: TextDocument, line: number): string;
6
+ //# sourceMappingURL=resolve.d.ts.map
@@ -1,3 +1,4 @@
1
1
  import type * as vscode from '@volar/language-service';
2
2
  import { SharedContext } from '../types';
3
3
  export declare function register(ctx: SharedContext): (uri: string, position: vscode.Position) => vscode.LocationLink[];
4
+ //# sourceMappingURL=definition.d.ts.map
@@ -8,3 +8,4 @@ export declare function register(ctx: SharedContext): (uri: string, options: {
8
8
  declaration?: boolean;
9
9
  }) => vscode.Diagnostic[];
10
10
  export declare function getEmitDeclarations(compilerOptions: ts.CompilerOptions): boolean;
11
+ //# sourceMappingURL=diagnostics.d.ts.map
@@ -1,3 +1,4 @@
1
1
  import { SharedContext } from '../types';
2
2
  import type * as vscode from '@volar/language-service';
3
3
  export declare function register(ctx: SharedContext): (uri: string, position: vscode.Position) => vscode.DocumentHighlight[];
4
+ //# sourceMappingURL=documentHighlight.d.ts.map
@@ -1,3 +1,4 @@
1
1
  import type * as vscode from '@volar/language-service';
2
2
  import { SharedContext } from '../types';
3
3
  export declare function register(ctx: SharedContext): (uri: string) => vscode.DocumentSymbol[];
4
+ //# sourceMappingURL=documentSymbol.d.ts.map
@@ -1,3 +1,4 @@
1
1
  import type * as vscode from '@volar/language-service';
2
2
  import { SharedContext } from '../types';
3
3
  export declare function register(ctx: SharedContext): (uri: string) => vscode.Location[];
4
+ //# sourceMappingURL=fileReferences.d.ts.map
@@ -1,3 +1,4 @@
1
1
  import type * as vscode from 'vscode-languageserver-protocol';
2
2
  import { SharedContext } from '../types';
3
3
  export declare function register(ctx: SharedContext): (oldUri: string, newUri: string) => Promise<vscode.WorkspaceEdit | undefined>;
4
+ //# sourceMappingURL=fileRename.d.ts.map
@@ -1,3 +1,4 @@
1
1
  import type * as vscode from '@volar/language-service';
2
2
  import { SharedContext } from '../types';
3
3
  export declare function register(ctx: SharedContext): (uri: string) => vscode.FoldingRange[];
4
+ //# sourceMappingURL=foldingRanges.d.ts.map
@@ -5,3 +5,4 @@ export declare function register(ctx: SharedContext): {
5
5
  onRange: (document: TextDocument, range: vscode.Range | undefined, options: vscode.FormattingOptions) => Promise<vscode.TextEdit[]>;
6
6
  onType: (document: TextDocument, options: vscode.FormattingOptions, position: vscode.Position, key: string) => Promise<vscode.TextEdit[]>;
7
7
  };
8
+ //# sourceMappingURL=formatting.d.ts.map
@@ -1,3 +1,4 @@
1
1
  import type * as vscode from '@volar/language-service';
2
2
  import { SharedContext } from '../types';
3
3
  export declare function register(ctx: SharedContext): (uri: string, position: vscode.Position, documentOnly?: boolean) => vscode.Hover | undefined;
4
+ //# sourceMappingURL=hover.d.ts.map
@@ -1,3 +1,4 @@
1
1
  import type * as vscode from 'vscode-languageserver-protocol';
2
2
  import { SharedContext } from '../types';
3
3
  export declare function register(ctx: SharedContext): (uri: string, position: vscode.Position) => vscode.LocationLink[];
4
+ //# sourceMappingURL=implementation.d.ts.map
@@ -1,3 +1,4 @@
1
1
  import { SharedContext } from '../types';
2
2
  import type * as vscode from '@volar/language-service';
3
3
  export declare function register(ctx: SharedContext): (uri: string, range: vscode.Range) => Promise<vscode.InlayHint[] | undefined>;
4
+ //# sourceMappingURL=inlayHints.d.ts.map
@@ -6,3 +6,4 @@ export declare const renameInfoOptions: {
6
6
  export declare function register(ctx: SharedContext): (uri: string, position: vscode.Position) => vscode.Range | {
7
7
  message: string;
8
8
  } | undefined;
9
+ //# sourceMappingURL=prepareRename.d.ts.map
@@ -1,3 +1,4 @@
1
1
  import type * as vscode from '@volar/language-service';
2
2
  import { SharedContext } from '../types';
3
3
  export declare function register(ctx: SharedContext): (uri: string, position: vscode.Position) => vscode.Location[];
4
+ //# sourceMappingURL=references.d.ts.map
@@ -3,3 +3,4 @@ import type * as vscode from '@volar/language-service';
3
3
  import { SharedContext } from '../types';
4
4
  export declare function register(ctx: SharedContext): (uri: string, position: vscode.Position, newName: string) => Promise<vscode.WorkspaceEdit | undefined>;
5
5
  export declare function fileTextChangesToWorkspaceEdit(changes: readonly ts.FileTextChanges[], ctx: SharedContext): vscode.WorkspaceEdit;
6
+ //# sourceMappingURL=rename.d.ts.map
@@ -1,3 +1,4 @@
1
1
  import { SharedContext } from '../types';
2
2
  import type * as vscode from '@volar/language-service';
3
3
  export declare function register(ctx: SharedContext): (uri: string, positions: vscode.Position[]) => vscode.SelectionRange[];
4
+ //# sourceMappingURL=selectionRanges.d.ts.map
@@ -1,3 +1,4 @@
1
1
  import type * as vscode from '@volar/language-service';
2
2
  import { SharedContext } from '../types';
3
3
  export declare function register(ctx: SharedContext): (uri: string, range: vscode.Range, legend: vscode.SemanticTokensLegend) => [number, number, number, number, number][] | undefined;
4
+ //# sourceMappingURL=semanticTokens.d.ts.map
@@ -1,3 +1,4 @@
1
1
  import { SharedContext } from '../types';
2
2
  import type * as vscode from '@volar/language-service';
3
3
  export declare function register(ctx: SharedContext): (uri: string, position: vscode.Position, context?: vscode.SignatureHelpContext) => vscode.SignatureHelp | undefined;
4
+ //# sourceMappingURL=signatureHelp.d.ts.map
@@ -1,3 +1,4 @@
1
1
  import type * as vscode from 'vscode-languageserver-protocol';
2
2
  import { SharedContext } from '../types';
3
3
  export declare function register(ctx: SharedContext): (uri: string, position: vscode.Position) => vscode.LocationLink[];
4
+ //# sourceMappingURL=typeDefinition.d.ts.map
@@ -1,3 +1,4 @@
1
1
  import type * as vscode from '@volar/language-service';
2
2
  import { SharedContext } from '../types';
3
3
  export declare function register(ctx: SharedContext): (query: string) => vscode.WorkspaceSymbol[];
4
+ //# sourceMappingURL=workspaceSymbol.d.ts.map
package/out/index.d.ts CHANGED
@@ -14,3 +14,4 @@ export interface Provide {
14
14
  }
15
15
  export declare function create(): Service<Provide>;
16
16
  export default create;
17
+ //# sourceMappingURL=index.d.ts.map
@@ -70,3 +70,4 @@ export declare enum EventName {
70
70
  projectLoadingStart = "projectLoadingStart",
71
71
  projectLoadingFinish = "projectLoadingFinish"
72
72
  }
73
+ //# sourceMappingURL=protocol.const.d.ts.map
package/out/shared.d.ts CHANGED
@@ -3,3 +3,4 @@ export declare function getConfigTitle(document: TextDocument): string;
3
3
  export declare function isTsDocument(document: TextDocument): boolean;
4
4
  export declare function isJsonDocument(document: TextDocument): boolean;
5
5
  export declare function safeCall<T>(cb: () => T): T | undefined;
6
+ //# sourceMappingURL=shared.d.ts.map
package/out/types.d.ts CHANGED
@@ -7,3 +7,4 @@ export type SharedContext = ServiceContext & {
7
7
  };
8
8
  ts: typeof import('typescript/lib/tsserverlibrary');
9
9
  };
10
+ //# sourceMappingURL=types.d.ts.map
@@ -9,3 +9,4 @@ export declare const incorrectlyImplementsInterface: Set<number>;
9
9
  export declare const cannotFindName: Set<number>;
10
10
  export declare const extendsShouldBeImplements: Set<number>;
11
11
  export declare const asyncOnlyAllowedInAsyncFunctions: Set<number>;
12
+ //# sourceMappingURL=errorCodes.d.ts.map
@@ -11,3 +11,4 @@ export declare const spelling = "spelling";
11
11
  export declare const fixImport = "import";
12
12
  export declare const addMissingAwait = "addMissingAwait";
13
13
  export declare const addMissingOverride = "fixOverrideModifier";
14
+ //# sourceMappingURL=fixNames.d.ts.map
@@ -1 +1,2 @@
1
1
  export declare function parseKindModifier(kindModifiers: string): Set<string>;
2
+ //# sourceMappingURL=modifiers.d.ts.map
@@ -11,3 +11,4 @@ export declare function plainWithLinks(parts: readonly Proto.SymbolDisplayPart[]
11
11
  export declare function tagsMarkdownPreview(tags: readonly ts.JSDocTagInfo[], filePathConverter: IFilePathToResourceConverter, ctx: SharedContext): string;
12
12
  export declare function markdownDocumentation(documentation: Proto.SymbolDisplayPart[] | string | undefined, tags: ts.JSDocTagInfo[] | undefined, filePathConverter: IFilePathToResourceConverter, ctx: SharedContext): string;
13
13
  export declare function addMarkdownDocumentation(out: string, documentation: Proto.SymbolDisplayPart[] | string | undefined, tags: ts.JSDocTagInfo[] | undefined, converter: IFilePathToResourceConverter, ctx: SharedContext): string;
14
+ //# sourceMappingURL=previewer.d.ts.map
@@ -6,3 +6,4 @@ export declare function snippetForFunctionCall(item: {
6
6
  snippet: string;
7
7
  parameterCount: number;
8
8
  };
9
+ //# sourceMappingURL=snippetForFunctionCall.d.ts.map
@@ -8,3 +8,4 @@ export declare function entriesToLocations(entries: {
8
8
  }[], ctx: SharedContext): vscode.Location[];
9
9
  export declare function entriesToLocationLinks<T extends ts.DocumentSpan>(entries: T[], ctx: SharedContext): vscode.LocationLink[];
10
10
  export declare function boundSpanToLocationLinks(info: ts.DefinitionInfoAndBoundSpan, originalDoc: TextDocument, ctx: SharedContext): vscode.LocationLink[];
11
+ //# sourceMappingURL=transforms.d.ts.map
@@ -2,3 +2,4 @@ import type * as ts from 'typescript/lib/tsserverlibrary';
2
2
  export declare namespace SymbolKind {
3
3
  function fromProtocolScriptElementKind(kind: ts.ScriptElementKind): 2 | 5 | 10 | 22 | 11 | 6 | 7 | 13 | 12 | 9 | 26 | 15;
4
4
  }
5
+ //# sourceMappingURL=typeConverters.d.ts.map
package/package.json CHANGED
@@ -1,6 +1,13 @@
1
1
  {
2
2
  "name": "volar-service-typescript",
3
- "version": "0.0.12",
3
+ "version": "0.0.14",
4
+ "description": "Integrate TypeScript into Volar",
5
+ "homepage": "https://github.com/volarjs/services/tree/master/packages/typescript",
6
+ "bugs": "https://github.com/volarjs/services/issues",
7
+ "sideEffects": false,
8
+ "keywords": [
9
+ "volar-service"
10
+ ],
4
11
  "main": "out/index.js",
5
12
  "license": "MIT",
6
13
  "files": [
@@ -12,16 +19,21 @@
12
19
  "url": "https://github.com/volarjs/services.git",
13
20
  "directory": "packages/typescript"
14
21
  },
22
+ "author": {
23
+ "name": "Johnson Chu",
24
+ "email": "johnsoncodehk@gmail.com",
25
+ "url": "https://github.com/johnsoncodehk"
26
+ },
15
27
  "devDependencies": {
16
- "@types/semver": "^7.3.13",
28
+ "@types/semver": "^7.5.3",
17
29
  "@volar/typescript": "latest"
18
30
  },
19
31
  "dependencies": {
20
- "semver": "^7.3.8",
32
+ "semver": "^7.5.4",
21
33
  "typescript-auto-import-cache": "^0.3.0",
22
- "vscode-languageserver-textdocument": "^1.0.8",
34
+ "vscode-languageserver-textdocument": "^1.0.11",
23
35
  "vscode-nls": "^5.2.0",
24
- "vscode-uri": "^3.0.7"
36
+ "vscode-uri": "^3.0.8"
25
37
  },
26
38
  "peerDependencies": {
27
39
  "@volar/language-service": "~1.10.0",
@@ -32,5 +44,5 @@
32
44
  "optional": true
33
45
  }
34
46
  },
35
- "gitHead": "7422c8d99d498df660ff9be3491545a5b45b3622"
47
+ "gitHead": "6fb81d23ead08b2fdb0812b272216ced8497aed0"
36
48
  }