Check Keep a Changelog for recommendations on how to structure this file.
Highlight:
- marked
exp
namespace as deprecated and replace withex
due to conflict with node.jsexp
. - removed
case
insw
because TypeScript is able to provide intellisense for the case statement.
- added
ex
namespace to replaceexp
- marked all snippets with
exp
namespace as deprecated
- removed
case
template insw
(switch statement) - removed
hasOwnProperty
check infoi
- added many
console
APIs - introduced
cl
namespace forconsole
, butcl
itself remain forconsole.log
im
: importimm
: import.metaimu
: import.meta.urlimd
: import module dynamically
- rename
impf
toimf
(import file) - new tab stop for
imp
(import module) andimas
(import module as) for import assert
- add
hyper:
prefix to description to help user distinguish when turning on/off snippet - let user choose equality operator in
tof
- Restore
$3
tab stop insw
.
- Provide new
ar
,ara
,ag
,aga
arrow function snippets.ar
andara
with a return type tab stop.ag
andaga
with generic type and return type tab stop.
- Shorter pran to prn (Promise.any).
- Add back parentheses to function snippets.
- Added
Promise.{allSettled,any}
.
- Remove newline for
switch
andcase
. - Rename
case
tocas
, avoid meaningful. - Rename
ctor
tocst
, avoid conflict to built-in. - Rename
require
tore
avoid meaningful. - Remove
()
for every function snippets to enhance capatibility.- This can make declare generator function, type generic type, return type easier.
- With side effect, merge anonymous function and named function snippets.
- TypeScript snippets is now show in TypeScript file type
typescript
andtypescriptreact
only.
prt
for create Promise type, likePromise<T>
(TypeScript).enc
for createconst enum
(TypeScript).
- Add snippet for
for await of
asfoa
.
- Remove all labeled console snippets, cause this can be simply console within a object, e.g.
console.log({ name })
.
Keep making prefix shorter
else
toel
,switch
tosw
,for
tofo
,forin
tofoi
,forof
tofof
,while
towh
.
Two subjects for this update -- "Less is more" and "expression first".
- Remove all snippets relate to generator function due to they can simply replace by normal function snippet plus a
*
(use prettier to auto format position of asterisk).
- Remove the curly braces in some of the snippets including
if*
,for*
, andwhile
statement (expression first, add curly braces if you need). - Adjust the tab stop order for
try*
snippets, remove error argument (optional error binding, ES2019) to make it optional (still tab stop there). - replace
enum
toenu
.
- Add
expaf
for export all from - Add
cd
andcdl
forconsole.dir
- Remove placeholder in
tof
for better intellisense support.
- Add
ct
forconsole.time
(have fun for test time consumption).
- Remove go to end tab stop in all destructure related snippets due tab stop unsupport intellisense.
- Intellisense not available on source but at least on destructuring.
- Not the best but press [end] is a manual alternative.
- Replace
nexttick
tont
.
- Make readme up to date.
- Review all snippets and make cursor end in right position.
- Fix inconsistent
ol
between README and snippet.
- Remove go to end tab stop for all
function
relative snippets. - Update README to explain "no intellisense" issue.
A big change here, so I decide to make a version upgrade to 2.0.0. I take out many of snippets than may hava a low use rate, should not use, and object methods. If this really bother you, I feel sorry 😢
forarry
andrforarr
- array method likeforEach
,map
,filter
, andreduce
are recommended.bind
,apply
, andcall
for function - they are function method with nice intellisense by VSCode.kv
,oa
,oc
for object - same as above.th
,cat
,fin
for promise - same as above.pctor
andproto
for prototype - use ES2015class
instead.
vda
,lda
, andcda
becomevad
,lad
, andcad
- consist to how function prefix work which like a namespace.import
becomeimpf
for import - namespace like; not like export, if import without name, it surely for a file path.p
becomepr
for promise - namespace like.c
,cex
,cm
, andacm
becomecs
,cse
,csm
, andcsma
- namespace like.ternary
becometer
for ternary - make it shorter.- Rewrite README.md, make it more short and clear.
prs
,prj
, andpra
for promise - static methodresolve
,reject
, andall
for Promise.
- Remove all test snippets, due its should not cover in this extension.
- Combine
impas
andimpall
and removeimpall
and Fixed intellisense broken cause by syntax error. dp
(destructuring parameter) totd
(type destructuring), which a big mistake.- remove prefill
{}
for destructuring assignment (vda
,lda
,cda
) as well as type destructuring (td
), cause both array and object support destructuring.
- TypeScript type default right side as empty rather than object.
- All
import
,export
, andrequire
with path now default with single quote and end semicolon (no more path intellisense issue).
trycatch
rename totc
.
- Remove
trycatch
andtcf
redundant(${1})
.
typ
for TypeScripttype
.dp
for destructuring parameter.
- Add "ES2015" label for
la
,ca
,vda
,lda
,cda
in Declarations.
- Remove newline in
gs
,pctor
, andproto
. - Use more percise term in
tof
andiof
description. - Change label for only in Node.JS from "use only in node" to "Node.JS".
- Change view for snippets in README from list to table.
- Replace
ol
toslol
and removeslol
.
- Remove space between
function ()
inf
. - Update README.
- 3 new destructuring assigment for
var
,let
, andconst
.
var
,let
, andconst
remove the end semicolon and adjust the cursor point.- Make
if else
andelse if
prefix shorter toifel
andelif
. - Remove the
break
in the firstswitch
case andcase
to let user determinereturn
orbreak
to use, but keeping thedefault
break
to ensure even if user forgot to handle it. - Adding a space between
${1}
and:
inswitch
,case
, and${1}
and;
infor
to make sure it does not break auto close single/double quote and parentheses. - Remove unnecessary
${0}
inimport
. - Change
interface, module, namespaces
toint, mod, nam
to avoid directly same name as TypeScript / JavaScript keyword.
- Update README.
- Add placeholder to variable assignment for avoid syntax error.
- Unintended going end of snippets.
- Update README.
- Add CHANGELOG.
- First release.