Skip to content

Commit c3fce6d

Browse files
authored
Merge pull request #12 from L13/develop
Develop
2 parents 3c32677 + 3e48eed commit c3fce6d

File tree

8 files changed

+42
-21
lines changed

8 files changed

+42
-21
lines changed

CHANGELOG.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,19 @@
11
# Change Log
22
All notable changes to the "JavaScript and TypeScript Snippets" extension will be documented in this file.
33

4+
## [0.19.0] - 2021-04-04
5+
6+
### Added
7+
- Added to JSON `"key": false`, `"key": 0`, `"key": ""` and `"key": [ ... ]`.
8+
- Added `super.`.
9+
10+
### Changed
11+
- Changed `return ` to `return;`.
12+
- Removed `;` from `new Promise( ... )`.
13+
14+
### Removed
15+
- Removed `class NAME { ... }` and `class NAME extends PARENT { ... }`.
16+
417
## [0.18.0] - 2020-08-02
518

619
### Added

LICENCE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Copyright (c) 2019 - 2020 L13|RARY
1+
Copyright (c) 2019 - 2021 L13|RARY
22

33
Permission is hereby granted, free of charge, to any person obtaining a copy
44
of this software and associated documentation files (the "Software"), to deal

README.md

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
11
# JavaScript and TypeScript Snippets
22

3-
This extension contains keyword snippets and micro patterns for JavaScript and TypeScript.
3+
This extension contains keyword snippets and micro patterns for JavaScript, TypeScript and JSON.
44

5-
## What's new in JavaScript and TypeScript Snippets 0.18.0
5+
## What's new in JavaScript and TypeScript Snippets 0.19.0
66

7-
- Added `Array.isArray()`.
8-
- Added `Object.assign()`, `Object.create()`, `Object.entries()`, `Object.keys()` and `Object.values()`.
9-
- Added `Symbol()`, `Symbol.for()` and `Symbol.keyFor()`.
7+
- Added to JSON `"key": false`, `"key": 0`, `"key": ""` and `"key": [ ... ]`.
8+
- Added `super.`.
9+
- Changed `return ` to `return;`.
10+
- Removed `;` from `new Promise( ... )`.
11+
- Removed `class NAME { ... }` and `class NAME extends PARENT { ... }`.
1012

1113
## Index
1214

SNIPPETS.md

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,10 @@ Complete list of all JavaScript and TypeScript snippets for Visual Studio Code.
1111
| `t` | `true` |
1212
| `_` | `{ $0 }` |
1313
| `_1` | `"${1:key}": ${0:null}` |
14+
| `_b1` | `"${1:key}": ${0:false}` |
15+
| `_n1` | `"${1:key}": ${0:0}` |
16+
| `_s1` | `"${1:key}": "$0"` |
17+
| `_$` | `"${1:key}": [ $0 ]` |
1418
| `__` | `"${1:key}": { $0 }` |
1519

1620
### JavaScript
@@ -24,8 +28,9 @@ Complete list of all JavaScript and TypeScript snippets for Visual Studio Code.
2428
| `f` | `false` |
2529
| `i` | `${1:identifier} instanceof ${0:constructor}` |
2630
| `n` | `null` |
31+
| `r` | `return$0;` |
32+
| `s` | `super.` |
2733
| `t` | `true` |
28-
| `r` | `return ` |
2934
| `u` | `undefined` |
3035
| `v` | `void ` |
3136
| `y` | `yield` |
@@ -105,8 +110,6 @@ Complete list of all JavaScript and TypeScript snippets for Visual Studio Code.
105110
| `ef_` | `export function ${1:name} ($2) { $0 }` |
106111
| `eaf_` | `export async function ${1:name} ($2) { $0 }` |
107112
| `edf_` | `export default function ($1) { $0 }` |
108-
| `c_` | `class ${1:name} { $0 }` |
109-
| `ce_` | `class ${1:name} extends ${2:parent} { $0 }` |
110113
| `ec_` | `export class ${1:name} { $0 }` |
111114
| `ece_` | `export class ${1:name} extends ${2:parent} { $0 }` |
112115
| `edc_` | `export default class { $0 }` |
@@ -164,8 +167,8 @@ Complete list of all JavaScript and TypeScript snippets for Visual Studio Code.
164167
| `Oe$` | `Object.entries($0)` |
165168
| `Ok$` | `Object.keys($0)` |
166169
| `Ov$` | `Object.values($0)` |
167-
| `nP$_` | `new Promise((resolve, reject) => { $0 });` |
168-
| `nPf_` | `new Promise(function (resolve, reject) { $0 });` |
170+
| `nP$_` | `new Promise((resolve, reject) => { $0 })` |
171+
| `nPf_` | `new Promise(function (resolve, reject) { $0 })` |
169172
| `Pa$` | `Promise.all($0)` |
170173
| `Pr$` | `Promise.resolve($0)` |
171174
| `Pr$` | `Promise.reject($0)` |
@@ -174,9 +177,9 @@ Complete list of all JavaScript and TypeScript snippets for Visual Studio Code.
174177

175178
| Prefix | Snippet |
176179
| ------:| ------- |
177-
| `t1` | `type ${1:name} = ${0:value};` |
180+
| `t1` | `type ${1:name} = ${0:null};` |
178181
| `t_` | `type ${1:name} = { $0 };` |
179-
| `et1` | `export type ${1:name} = ${0:value};` |
182+
| `et1` | `export type ${1:name} = ${0:null};` |
180183
| `et_` | `export type ${1:name} = { $0 };` |
181184
| `i_` | `interface ${1:name} { $0 }` |
182185
| `ie_` | `interface ${1:name} extends ${2:name} { $0 }` |

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "l13-js-snippets",
33
"displayName": "JavaScript and TypeScript Snippets",
44
"description": "Keyword snippets and micro patterns for JavaScript and TypeScript",
5-
"version": "0.18.0",
5+
"version": "0.19.0",
66
"preview": true,
77
"publisher": "L13RARY",
88
"license": "SEE LICENCE IN LICENCE.md",

snippets/javascript.json

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,9 @@
66
"false": { "prefix": "f", "body": ["false"], "description": "" },
77
"instanceof": { "prefix": "i", "body": ["${1:identifier} instanceof ${0:constructor}"], "description": "" },
88
"null": { "prefix": "n", "body": ["null"], "description": "" },
9+
"return;": { "prefix": "r", "body": ["return$0;"], "description": "" },
10+
"super": { "prefix": "s", "body": ["super."], "description": "" },
911
"true": { "prefix": "t", "body": ["true"], "description": "" },
10-
"return": { "prefix": "r", "body": ["return "], "description": "" },
1112
"undefined": { "prefix": "u", "body": ["undefined"], "description": "" },
1213
"void": { "prefix": "v", "body": ["void "], "description": "" },
1314
"yield": { "prefix": "y", "body": ["yield"], "description": "" },
@@ -113,8 +114,6 @@
113114
"export async function () {}": { "prefix": "eaf_", "body": ["export async function ${1:name} ($2) {", "\t", "\t$0", "\t", "}"], "description": "" },
114115
"export default function () {}": { "prefix": "edf_", "body": ["export default function ($1) {", "\t", "\t$0", "\t", "}"], "description": "" },
115116

116-
"class NAME {}": { "prefix": "c_", "body": ["class ${1:name} {", "\t", "\t$0", "\t", "}"], "description": "" },
117-
"class NAME extends PARENT {}": { "prefix": "ce_", "body": ["class ${1:name} extends ${2:parent} {", "\t", "\t$0", "\t", "}"], "description": "" },
118117
"export class NAME {}": { "prefix": "ec_", "body": ["export class ${1:name} {", "\t", "\t$0", "\t", "}"], "description": "" },
119118
"export class NAME extends PARENT {}": { "prefix": "ece_", "body": ["export class ${1:name} extends ${2:parent} {", "\t", "\t$0", "\t", "}"], "description": "" },
120119
"export default class {}": { "prefix": "edc_", "body": ["export default class {", "\t", "\t$0", "\t", "}"], "description": "" },
@@ -183,8 +182,8 @@
183182
"Object.keys()": { "prefix": "Ok$", "body": ["Object.keys($0)"], "description": "" },
184183
"Object.values()": { "prefix": "Ov$", "body": ["Object.values($0)"], "description": "" },
185184

186-
"new Promise(() => {})": { "prefix": "nP$_", "body": ["new Promise((resolve, reject) => {", "\t", "\t$0", "\t", "});"], "description": "" },
187-
"new Promise(function () {})": { "prefix": "nPf_", "body": ["new Promise(function (resolve, reject) {", "\t", "\t$0", "\t", "});"], "description": "" },
185+
"new Promise(() => {})": { "prefix": "nP$_", "body": ["new Promise((resolve, reject) => {", "\t", "\t$0", "\t", "})"], "description": "" },
186+
"new Promise(function () {})": { "prefix": "nPf_", "body": ["new Promise(function (resolve, reject) {", "\t", "\t$0", "\t", "})"], "description": "" },
188187
"Promise.all()": { "prefix": "Pa$", "body": ["Promise.all($0)"], "description": "" },
189188
"Promise.resolve()": { "prefix": "Pr$", "body": ["Promise.resolve($0)"], "description": "" },
190189
"Promise.reject()": { "prefix": "Pr$", "body": ["Promise.reject($0)"], "description": "" },

snippets/json.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,9 @@
55

66
"{}": { "prefix": "_", "body": ["{", "\t$0", "}"], "description": "" },
77
"\"key\": null": { "prefix": "_1", "body": ["\"${1:key}\": ${0:null}"], "description": "" },
8+
"\"key\": false": { "prefix": "_b1", "body": ["\"${1:key}\": ${0:false}"], "description": "" },
9+
"\"key\": 0": { "prefix": "_n1", "body": ["\"${1:key}\": ${0:0}"], "description": "" },
10+
"\"key\": \"\"": { "prefix": "_s1", "body": ["\"${1:key}\": \"$0\""], "description": "" },
11+
"\"key\": []": { "prefix": "_$", "body": ["\"${1:key}\": [", "\t$0", "]"], "description": "" },
812
"\"key\": {}": { "prefix": "__", "body": ["\"${1:key}\": {", "\t$0", "}"], "description": "" }
913
}

snippets/typescript.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
2-
"type NAME = VALUE;": { "prefix": "t1", "body": ["type ${1:name} = ${0:value};"], "description": "" },
2+
"type NAME = null;": { "prefix": "t1", "body": ["type ${1:name} = ${0:null};"], "description": "" },
33
"type NAME = {};": { "prefix": "t_", "body": ["type ${1:name} = {", "\t$0", "};"], "description": "" },
4-
"export type NAME = VALUE;": { "prefix": "et1", "body": ["export type ${1:name} = ${0:value};"], "description": "" },
4+
"export type NAME = null;": { "prefix": "et1", "body": ["export type ${1:name} = ${0:null};"], "description": "" },
55
"export type NAME = {};": { "prefix": "et_", "body": ["export type ${1:name} = {", "\t$0", "};"], "description": "" },
66

77
"interface NAME": { "prefix": "i_", "body": ["interface ${1:name} {", "\t", "\t$0", "\t", "}"], "description": "" },

0 commit comments

Comments
 (0)