Check Keep a Changelog for recommendations on how to structure this file.
Highlight:
- marked
expnamespace as deprecated and replace withexdue to conflict with node.jsexp. - removed
caseinswbecause TypeScript is able to provide intellisense for the case statement.
- added
exnamespace to replaceexp
- marked all snippets with
expnamespace as deprecated
- removed
casetemplate insw(switch statement) - removed
hasOwnPropertycheck infoi
- added many
consoleAPIs - introduced
clnamespace forconsole, butclitself remain forconsole.log
im: importimm: import.metaimu: import.meta.urlimd: import module dynamically
- rename
impftoimf(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
$3tab stop insw.
- Provide new
ar,ara,ag,agaarrow function snippets.arandarawith a return type tab stop.agandagawith 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
switchandcase. - Rename
casetocas, avoid meaningful. - Rename
ctortocst, avoid conflict to built-in. - Rename
requiretoreavoid 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
typescriptandtypescriptreactonly.
prtfor create Promise type, likePromise<T>(TypeScript).encfor createconst enum(TypeScript).
- Add snippet for
for await ofasfoa.
- Remove all labeled console snippets, cause this can be simply console within a object, e.g.
console.log({ name }).
Keep making prefix shorter
elsetoel,switchtosw,fortofo,forintofoi,foroftofof,whiletowh.
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*, andwhilestatement (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
enumtoenu.
- Add
expaffor export all from - Add
cdandcdlforconsole.dir
- Remove placeholder in
toffor better intellisense support.
- Add
ctforconsole.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
nextticktont.
- Make readme up to date.
- Review all snippets and make cursor end in right position.
- Fix inconsistent
olbetween README and snippet.
- Remove go to end tab stop for all
functionrelative 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 😢
forarryandrforarr- array method likeforEach,map,filter, andreduceare recommended.bind,apply, andcallfor function - they are function method with nice intellisense by VSCode.kv,oa,ocfor object - same as above.th,cat,finfor promise - same as above.pctorandprotofor prototype - use ES2015classinstead.
vda,lda, andcdabecomevad,lad, andcad- consist to how function prefix work which like a namespace.importbecomeimpffor import - namespace like; not like export, if import without name, it surely for a file path.pbecomeprfor promise - namespace like.c,cex,cm, andacmbecomecs,cse,csm, andcsma- namespace like.ternarybecometerfor ternary - make it shorter.- Rewrite README.md, make it more short and clear.
prs,prj, andprafor promise - static methodresolve,reject, andallfor Promise.
- Remove all test snippets, due its should not cover in this extension.
- Combine
impasandimpalland removeimpalland 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, andrequirewith path now default with single quote and end semicolon (no more path intellisense issue).
trycatchrename totc.
- Remove
trycatchandtcfredundant(${1}).
typfor TypeScripttype.dpfor destructuring parameter.
- Add "ES2015" label for
la,ca,vda,lda,cdain Declarations.
- Remove newline in
gs,pctor, andproto. - Use more percise term in
tofandiofdescription. - 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
oltosloland removeslol.
- Remove space between
function ()inf. - Update README.
- 3 new destructuring assigment for
var,let, andconst.
var,let, andconstremove the end semicolon and adjust the cursor point.- Make
if elseandelse ifprefix shorter toifelandelif. - Remove the
breakin the firstswitchcase andcaseto let user determinereturnorbreakto use, but keeping thedefaultbreakto ensure even if user forgot to handle it. - Adding a space between
${1}and:inswitch,case, and${1}and;inforto make sure it does not break auto close single/double quote and parentheses. - Remove unnecessary
${0}inimport. - Change
interface, module, namespacestoint, mod, namto 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.