forked from microsoft/typespec
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[vs-code-extension] add basic snippets for typespec (microsoft#4737)
- add snippets for typespec basic constructs - package snippets within vs code extension part of microsoft#4559
- Loading branch information
Showing
4 changed files
with
48 additions
and
1 deletion.
There are no files selected for viewing
7 changes: 7 additions & 0 deletions
7
.chronus/changes/vs-code-extension-typespec-snippets-2024-9-15-11-2-20.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
--- | ||
changeKind: feature | ||
packages: | ||
- typespec-vscode | ||
--- | ||
|
||
Add basic snippets for typespec |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,3 +17,4 @@ dist/test/ | |
!ThirdPartyNotices.txt | ||
!LICENSE | ||
!icons/ | ||
!snippets.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
{ | ||
"Enum": { | ||
"prefix": "enum", | ||
"body": "enum ${1:Name} {\n ${0:value},\n}", | ||
"description": "Enum definition" | ||
}, | ||
"Interface": { | ||
"prefix": "interface", | ||
"body": "interface ${1:Name} {\n ${2:member}(${3:parameters}:${4:type}): ${0:returnType};\n}", | ||
"description": "Interface definition" | ||
}, | ||
"Model": { | ||
"prefix": "model", | ||
"body": "model ${1:Name} {\n ${2:propertyName}: ${0:propertyType};\n}", | ||
"description": "Model definition" | ||
}, | ||
"Namespace": { | ||
"prefix": "namespace", | ||
"body": "namespace ${1:Name} {\n $TM_SELECTED_TEXT$0\n}", | ||
"description": "Namespace definition" | ||
}, | ||
"Operation": { | ||
"prefix": ["op", "operation"], | ||
"body": "op ${1:name}(${2:parameters}:${3:type}): ${0:returnType};", | ||
"description": "Operation definition" | ||
}, | ||
"Union": { | ||
"prefix": "union", | ||
"body": "union ${1:Name} = ${2:variant1} | ${0:variant2};", | ||
"description": "Named union definition" | ||
} | ||
} |