Skip to content

Commit 7e587a0

Browse files
committed
restore some explicit empty snippets
1 parent 3defe8a commit 7e587a0

File tree

5 files changed

+46
-13
lines changed

5 files changed

+46
-13
lines changed

.vscode/settings.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@
77
"aafe",
88
"aafea",
99
"aafead",
10+
"aafee",
11+
"aafeea",
1012
"aafii",
1113
"afad",
1214
"afeea",

CHANGELOG.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,18 @@ Fixed for any bug fixes.
99
Security to invite users to upgrade in case of vulnerabilities.
1010
-->
1111

12+
## 3.1.0 - 2022/10/25
13+
14+
### Added
15+
16+
- Restored `afee` and `afeea` snippets by community request, to easy use on unit testing.
17+
- Added the `aafee` and `aafeea` with async snippets.
18+
1219
## 3.0.0 - 2022/10/18
1320

1421
### Removed
1522

16-
- Snippets `afee` and `afeea` on arrow functions without return. Were replaced adding an extra step (with tab) on the other snippets that include return to easy delete if was need.
23+
- Snippets `afee` and `afeea` on arrow functions without return. Were replaced adding an extra step (with tab) on the other snippets that include return to easy delete if was not need.
1724

1825
### Added
1926

README.md

Lines changed: 15 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -111,24 +111,28 @@ Below is a list of all available snippets and the triggers of each one. The **
111111
| `afe→` | explicit return | <code>() => {<br/>&nbsp;&nbsp;return █<br/> }</code> |
112112
| `afea→` | explicit return with arg(s) | <code>(arg) => {<br/>&nbsp;&nbsp;return █<br/> }</code> |
113113
| `afead→` | explicit return with arg destructuring | <code>({prop, prop}) => {<br/>&nbsp;&nbsp;return █<br/> }</code> |
114+
| `afee→` | explicit empty | <code>() => {<br/>&nbsp;&nbsp;█<br/> }</code> |
115+
| `afeea→` | explicit empty with arg(s) | <code>(arg) => {<br/>&nbsp;&nbsp;█<br/> }</code> |
114116
| `afp→` | explicit with parentheses | <code>() => {<br/>&nbsp;&nbsp;(█)<br/> }</code> |
115117
| `afpa→` | explicit with parentheses and arg(s) | <code>(arg) => {<br/>&nbsp;&nbsp;(█)<br/> }</code> |
116118
| `afii→` | immediately invoque | `(() => █)()` |
117119
| `iiaf→` | immediately invoque | `(() => █)()` |
118120

119121
#### Async Arrow Functions
120122

121-
| Trigger | Description | Result JS/TS |
122-
| -------: | -------------------------------------- | ---------------------------------------------------------------- |
123-
| `aaf→` | implicit return without arg(s) | `async () => █` |
124-
| `aafa→` | implicit return with arg(s) | `async (arg) => █` |
125-
| `aafad→` | implicit with arg destructuring | `async ({ prop }) => █` |
126-
| `aafe→` | explicit return | <code>async () => {<br/>&nbsp;&nbsp;return █<br/> }</code> |
127-
| `aafea→` | explicit return with arg(s) | <code>async (arg) => {<br/>&nbsp;&nbsp;return █<br/> }</code> |
128-
|`aafead→` | explicit return with arg destructuring | <code>async ({prop, prop}) => {<br/>&nbsp;&nbsp;return █<br/> }</code> |
129-
|`aaafea→` | explicit with args and await | <code>async (arg) => {<br/>&nbsp;&nbsp;const name = await █<br/> }</code>|
130-
| `aafii→` | immediately invoked | `(async () => █)()` |
131-
| `iiaaf→` | immediately invoked | `(async () => █)()` |
123+
| Trigger | Description | Result JS/TS |
124+
| -------: | -------------------------------------- | ------------------------------------------------------------------------- |
125+
| `aaf→` | implicit return without arg(s) | `async () => █` |
126+
| `aafa→` | implicit return with arg(s) | `async (arg) => █` |
127+
| `aafad→` | implicit with arg destructuring | `async ({ prop }) => █` |
128+
| `aafe→` | explicit return | <code>async () => {<br/>&nbsp;&nbsp;return █<br/> }</code> |
129+
| `aafea→` | explicit return with arg(s) | <code>async (arg) => {<br/>&nbsp;&nbsp;return █<br/> }</code> |
130+
|`aafead→` | explicit return with arg destructuring | <code>async ({prop, prop}) => {<br/>&nbsp;&nbsp;return █<br/> }</code> |
131+
| `aafee→` | explicit empty | <code>async () => {<br/>&nbsp;&nbsp;█<br/> }</code> |
132+
|`aafeea→` | explicit empty with arg(s) | <code>async (arg) => {<br/>&nbsp;&nbsp;█<br/> }</code> |
133+
|`aaafea→` | explicit with args and await | <code>async (arg) => {<br/>&nbsp;&nbsp;const name = await █<br/> }</code> |
134+
| `aafii→` | immediately invoked | `(async () => █)()` |
135+
| `iiaaf→` | immediately invoked | `(async () => █)()` |
132136

133137
### Promises
134138

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "arrow-function-snippets",
33
"description": "VS Code Arrow function snippets for JS and TS",
4-
"version": "3.0.0",
4+
"version": "3.1.0",
55
"displayName": "Arrow Function Snippets",
66
"publisher": "deinsoftware",
77
"icon": "images/light-icon.png",

snippets/arrow.json

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,16 @@
3939
"body": ["({${1:prop}, ${2:prop}}) => {", "\t${3:return} $0", "}"],
4040
"description": "Arrow function (explicit return) with argument destructuring"
4141
},
42+
"arrowFunctionExplicitEmpty": {
43+
"prefix": "afee",
44+
"body": ["() => {", "\t$0", "}"],
45+
"description": "Arrow function (without return)"
46+
},
47+
"arrowFunctionExplicitEmptyWithArguments": {
48+
"prefix": "afeea",
49+
"body": ["(${1:arg}) => {", "\t$0", "}"],
50+
"description": "Arrow function (without return) with arguments"
51+
},
4252
"arrowFunctionParentheses": {
4353
"prefix": "afp",
4454
"body": ["() => {", "\t( ${0} )", "}"],
@@ -84,6 +94,16 @@
8494
"body": ["async ({ ${1:prop}, ${2:prop} }) => {", "\t${3:return} $0", "}"],
8595
"description": "Arrow async function (explicit return) with argument destructuring"
8696
},
97+
"arrowAsyncFunctionExplicitEmpty": {
98+
"prefix": "aafee",
99+
"body": ["async () => {", "\t$0", "}"],
100+
"description": "Arrow async function (without return)"
101+
},
102+
"arrowAsyncFunctionExplicitEmptyWithArguments": {
103+
"prefix": "aafeea",
104+
"body": ["async (${1:arg}) => {", "\t$0", "}"],
105+
"description": "Arrow async function (without return) with arguments"
106+
},
87107
"arrowAsyncAwaitFunctionExplicitWithArguments": {
88108
"prefix": "aaafea",
89109
"body": ["async (${1:arg}) => {", "\tconst ${2:name} = await ${0}", "}"],

0 commit comments

Comments
 (0)