typespec-vscode 0.65.0-dev.9 → 0.65.0
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/README.md
CHANGED
|
@@ -1,25 +1,75 @@
|
|
|
1
|
-
# TypeSpec
|
|
1
|
+
# TypeSpec Extension in Visual Studio Code
|
|
2
2
|
|
|
3
3
|
[Repository](https://github.com/microsoft/typespec) | [Documentation](https://typespec.io/docs) | [Issues](https://github.com/microsoft/typespec/issues) | [Samples](https://github.com/microsoft/typespec/tree/main/packages/samples/specs)
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
The TypeSpec extension for Visual Studio Code enhances the development of TypeSpec by leveraging VS Code's powerful features. It provides:
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
- IntelliSense and syntax highlighting
|
|
8
|
+
- Code autocompletion and formatting
|
|
9
|
+
- Live diagnostics and quick fixes
|
|
10
|
+
- Refactoring tools (rename, go-to definition, etc.)
|
|
11
|
+
- Seamless project setup and emitter configuration
|
|
12
|
+
- Generate code from TypeSpec
|
|
13
|
+
|
|
14
|
+
## Prerequisites
|
|
15
|
+
|
|
16
|
+
Before using the TypeSpec extension, install [Node.js](https://nodejs.org/en/download/) and verify npm is available:
|
|
17
|
+
|
|
18
|
+
```sh
|
|
19
|
+
npm --version
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
Other necessary installations will be prompted within the extension as needed.
|
|
8
23
|
|
|
9
24
|
## Features
|
|
10
25
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
- Code
|
|
14
|
-
- Code folding
|
|
15
|
-
-
|
|
16
|
-
-
|
|
17
|
-
- Rename
|
|
18
|
-
-
|
|
26
|
+
### Writing TypeSpec
|
|
27
|
+
|
|
28
|
+
- **IntelliSense & Auto-completion**: Code faster with smart suggestions.
|
|
29
|
+
- **Code Formatting & Folding**: Keep your code clean and organized with built-in formatting and folding support.
|
|
30
|
+
- **Syntax Highlighting**: Clear and readable TypeSpec syntax.
|
|
31
|
+
- **Live Diagnostics**: Get real-time feedback on code issues.
|
|
32
|
+
- **Quick Fixes & Refactoring**: Rename, go-to definition, and format with ease.
|
|
33
|
+
- **Hover Info**: Get detailed information about TypeSpec elements by hovering over them.
|
|
34
|
+
|
|
35
|
+

|
|
36
|
+
|
|
37
|
+
### Project Initialization
|
|
38
|
+
|
|
39
|
+
- **Create TypeSpec Project**: Easily initialize a new TypeSpec project based on a template, ensuring a structured and ready-to-use setup.
|
|
40
|
+

|
|
41
|
+
|
|
42
|
+
### Generating Code from TypeSpec
|
|
43
|
+
|
|
44
|
+
The extension allows generating various outputs from TypeSpec:
|
|
45
|
+
|
|
46
|
+
- **OpenAPI Specification**
|
|
47
|
+
- **Server SDKs**: Generate server stubs for different back-end frameworks.
|
|
48
|
+
- **Client SDKs**: Generate client code for multiple languages, including:
|
|
49
|
+
- .NET (C#)
|
|
50
|
+
- Python
|
|
51
|
+
- Java
|
|
52
|
+
- JavaScript/TypeScript
|
|
53
|
+
|
|
54
|
+
Invoke `TypeSpec: Generate From TypeSpec` to generate code:
|
|
55
|
+
|
|
56
|
+

|
|
57
|
+
|
|
58
|
+
## Commands
|
|
59
|
+
|
|
60
|
+
The extension provides the following commands:
|
|
61
|
+
|
|
62
|
+
| **Command** | **Description** |
|
|
63
|
+
| -------------------------------------------------- | ------------------------------------------------------------------- |
|
|
64
|
+
| `TypeSpec: Create TypeSpec Project` | Scaffold a new TypeSpec project. |
|
|
65
|
+
| `TypeSpec: Install TypeSpec Compiler/CLI globally` | Install the TypeSpec Compiler/CLI globally. |
|
|
66
|
+
| `TypeSpec: Generate From TypeSpec` | Compile and generate from TypeSpec files into the specified output. |
|
|
67
|
+
| `TypeSpec: Restart TypeSpec Server` | Restart the TypeSpec language server. |
|
|
68
|
+
| `TypeSpec: Show Output Channel` | Open the TypeSpec output channel to view logs. |
|
|
19
69
|
|
|
20
|
-
##
|
|
70
|
+
## Configuration
|
|
21
71
|
|
|
22
|
-
TypeSpec
|
|
72
|
+
TypeSpec will interpolate a few variables using this pattern `${<name>}`. For example `${workspaceFolder}`.
|
|
23
73
|
|
|
24
74
|
Available variables:
|
|
25
75
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "typespec-vscode",
|
|
3
|
-
"version": "0.65.0
|
|
3
|
+
"version": "0.65.0",
|
|
4
4
|
"author": "Microsoft Corporation",
|
|
5
5
|
"description": "TypeSpec language support for VS Code",
|
|
6
6
|
"homepage": "https://typespec.io",
|
|
@@ -227,8 +227,6 @@
|
|
|
227
227
|
"@types/node": "~22.10.10",
|
|
228
228
|
"@types/vscode": "~1.96.0",
|
|
229
229
|
"@types/semver": "^7.5.8",
|
|
230
|
-
"@typespec/compiler": "~0.64.0 || >=0.65.0-dev <0.65.0",
|
|
231
|
-
"@typespec/internal-build-utils": "~0.64.0 || >=0.65.0-dev <0.65.0",
|
|
232
230
|
"@vitest/coverage-v8": "^3.0.4",
|
|
233
231
|
"@vitest/ui": "^3.0.3",
|
|
234
232
|
"@vscode/test-web": "^0.0.65",
|
|
@@ -239,12 +237,12 @@
|
|
|
239
237
|
"rollup": "~4.31.0",
|
|
240
238
|
"semver": "^7.6.3",
|
|
241
239
|
"typescript": "~5.7.3",
|
|
242
|
-
"vitest": "^3.0.
|
|
240
|
+
"vitest": "^3.0.5",
|
|
243
241
|
"vscode-languageclient": "~9.0.1",
|
|
244
|
-
"yaml": "~2.7.0"
|
|
242
|
+
"yaml": "~2.7.0",
|
|
243
|
+
"@typespec/compiler": "~0.65.0",
|
|
244
|
+
"@typespec/internal-build-utils": "~0.65.0"
|
|
245
245
|
},
|
|
246
|
-
"dependencies": {},
|
|
247
|
-
"peerDependencies": {},
|
|
248
246
|
"scripts": {
|
|
249
247
|
"clean": "rimraf ./dist ./temp",
|
|
250
248
|
"build": "npm run compile && npm run copy-tmlanguage && npm run generate-language-configuration && npm run generate-third-party-notices && npm run package-vsix",
|
|
index 9318206..6be6946 100644
|
|
|
Binary file
|