volar-service-typescript 0.0.13 → 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.
- package/LICENSE +21 -0
- package/README.md +25 -0
- package/out/configs/getFormatCodeSettings.d.ts +1 -0
- package/out/configs/getUserPreferences.d.ts +1 -0
- package/out/features/callHierarchy.d.ts +1 -0
- package/out/features/codeAction.d.ts +1 -0
- package/out/features/codeActionResolve.d.ts +1 -0
- package/out/features/completions/basic.d.ts +1 -0
- package/out/features/completions/directiveComment.d.ts +1 -0
- package/out/features/completions/jsDoc.d.ts +1 -0
- package/out/features/completions/resolve.d.ts +1 -0
- package/out/features/definition.d.ts +1 -0
- package/out/features/diagnostics.d.ts +1 -0
- package/out/features/documentHighlight.d.ts +1 -0
- package/out/features/documentSymbol.d.ts +1 -0
- package/out/features/fileReferences.d.ts +1 -0
- package/out/features/fileRename.d.ts +1 -0
- package/out/features/foldingRanges.d.ts +1 -0
- package/out/features/formatting.d.ts +1 -0
- package/out/features/hover.d.ts +1 -0
- package/out/features/implementation.d.ts +1 -0
- package/out/features/inlayHints.d.ts +1 -0
- package/out/features/prepareRename.d.ts +1 -0
- package/out/features/references.d.ts +1 -0
- package/out/features/rename.d.ts +1 -0
- package/out/features/selectionRanges.d.ts +1 -0
- package/out/features/semanticTokens.d.ts +1 -0
- package/out/features/signatureHelp.d.ts +1 -0
- package/out/features/typeDefinition.d.ts +1 -0
- package/out/features/workspaceSymbol.d.ts +1 -0
- package/out/index.d.ts +1 -0
- package/out/protocol.const.d.ts +1 -0
- package/out/shared.d.ts +1 -0
- package/out/types.d.ts +1 -0
- package/out/utils/errorCodes.d.ts +1 -0
- package/out/utils/fixNames.d.ts +1 -0
- package/out/utils/modifiers.d.ts +1 -0
- package/out/utils/previewer.d.ts +1 -0
- package/out/utils/snippetForFunctionCall.d.ts +1 -0
- package/out/utils/transforms.d.ts +1 -0
- package/out/utils/typeConverters.d.ts +1 -0
- 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 { 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 '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
|
|
@@ -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
|
package/out/features/hover.d.ts
CHANGED
|
@@ -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
|
package/out/features/rename.d.ts
CHANGED
|
@@ -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
|
package/out/index.d.ts
CHANGED
package/out/protocol.const.d.ts
CHANGED
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
|
@@ -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
|
package/out/utils/fixNames.d.ts
CHANGED
package/out/utils/modifiers.d.ts
CHANGED
package/out/utils/previewer.d.ts
CHANGED
|
@@ -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
|
|
@@ -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
|
package/package.json
CHANGED
|
@@ -1,6 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "volar-service-typescript",
|
|
3
|
-
"version": "0.0.
|
|
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
|
|
28
|
+
"@types/semver": "^7.5.3",
|
|
17
29
|
"@volar/typescript": "latest"
|
|
18
30
|
},
|
|
19
31
|
"dependencies": {
|
|
20
|
-
"semver": "^7.
|
|
32
|
+
"semver": "^7.5.4",
|
|
21
33
|
"typescript-auto-import-cache": "^0.3.0",
|
|
22
|
-
"vscode-languageserver-textdocument": "^1.0.
|
|
34
|
+
"vscode-languageserver-textdocument": "^1.0.11",
|
|
23
35
|
"vscode-nls": "^5.2.0",
|
|
24
|
-
"vscode-uri": "^3.0.
|
|
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": "
|
|
47
|
+
"gitHead": "6fb81d23ead08b2fdb0812b272216ced8497aed0"
|
|
36
48
|
}
|