Skip to content

Commit be7c8c7

Browse files
committed
Added .then and .catch snippets.
1 parent 59f723c commit be7c8c7

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

snippets/snippets.cson

+13-1
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,19 @@
5454
"""
5555
'new Promise':
5656
'prefix': 'npro'
57-
'body': 'new Promise((${1:resolve}, ${2:reject}) => )'
57+
'body': 'new Promise((${1:resolve}, ${2:reject}) => );'
58+
'then() with nested annonymous function':
59+
'prefix': 'then'
60+
'body': """then(( ${1:response} => {
61+
$2
62+
});
63+
"""
64+
'catch() with nested annonymous function':
65+
'prefix': '.catch'
66+
'body': """catch(( ${1:error} => {
67+
$2
68+
});
69+
"""
5870

5971
# React
6072
'React Component Snipet':

0 commit comments

Comments
 (0)