|
1 | 1 | {
|
2 |
| - "reactClassComponent": { |
3 |
| - "prefix": "rcc", |
| 2 | + "typeScriptReactClassComponent": { |
| 3 | + "prefix": "tsrcc", |
4 | 4 | "body": [
|
5 | 5 | "import React, { Component } from 'react'",
|
6 | 6 | "",
|
7 |
| - "export interface I${1:${TM_FILENAME_BASE}}Props {", |
| 7 | + "interface Props {", |
8 | 8 | "\t",
|
9 | 9 | "}",
|
10 |
| - "export interface I${1:${TM_FILENAME_BASE}}State {", |
| 10 | + "interface State {", |
11 | 11 | "\t",
|
12 | 12 | "}",
|
13 | 13 | "",
|
14 |
| - "export default class ${1:${TM_FILENAME_BASE}} extends Component<I${1:${TM_FILENAME_BASE}}Props, I${1:${TM_FILENAME_BASE}}State> {", |
| 14 | + "export default class ${1:${TM_FILENAME_BASE}} extends Component<Props, State> {", |
15 | 15 | "\tstate = {}",
|
16 | 16 | "",
|
17 | 17 | "\trender() {",
|
|
26 | 26 | ],
|
27 | 27 | "description": "Creates a React component class with ES7 module system and TypeScript interfaces"
|
28 | 28 | },
|
29 |
| - "reactClassExportComponent": { |
30 |
| - "prefix": "rce", |
| 29 | + "typeScriptReactClassExportComponent": { |
| 30 | + "prefix": "tsrce", |
31 | 31 | "body": [
|
32 | 32 | "import React, { Component } from 'react'",
|
33 | 33 | "",
|
34 |
| - "export interface I${1:${TM_FILENAME_BASE}}Props {", |
| 34 | + "interface Props {", |
35 | 35 | "\t",
|
36 | 36 | "}",
|
37 |
| - "export interface I${1:${TM_FILENAME_BASE}}State {", |
| 37 | + "interface State {", |
38 | 38 | "\t",
|
39 | 39 | "}",
|
40 | 40 | "",
|
41 |
| - "class ${1:${TM_FILENAME_BASE}} extends Component<I${1:${TM_FILENAME_BASE}}Props, I${1:${TM_FILENAME_BASE}}State> {", |
| 41 | + "class ${1:${TM_FILENAME_BASE}} extends Component<Props, State> {", |
42 | 42 | "\tstate = {}",
|
43 | 43 | "",
|
44 | 44 | "\trender() {",
|
|
55 | 55 | ],
|
56 | 56 | "description": "Creates a React component class with ES7 module system and TypeScript interfaces"
|
57 | 57 | },
|
58 |
| - "reactFunctionalExportComponent": { |
59 |
| - "prefix": "rfce", |
| 58 | + "typeScriptReactFunctionalExportComponent": { |
| 59 | + "prefix": "tsrfce", |
60 | 60 | "body": [
|
61 | 61 | "import React from 'react'",
|
62 | 62 | "",
|
63 |
| - "export interface I${1:${TM_FILENAME_BASE}}Props {", |
| 63 | + "interface Props {", |
64 | 64 | "\t",
|
65 | 65 | "}",
|
66 | 66 | "",
|
67 |
| - "function ${1:${TM_FILENAME_BASE}}(): I${1:${TM_FILENAME_BASE}}Props {", |
| 67 | + "function ${1:${TM_FILENAME_BASE}}(): Props {", |
68 | 68 | "\treturn (",
|
69 | 69 | "\t\t<div>",
|
70 | 70 | "\t\t\t$0",
|
|
77 | 77 | ],
|
78 | 78 | "description": "Creates a React Functional Component with ES7 module system and TypeScript interface"
|
79 | 79 | },
|
80 |
| - "reactFunctionalComponent": { |
81 |
| - "prefix": "rfc", |
| 80 | + "typeScriptReactFunctionalComponent": { |
| 81 | + "prefix": "tsrfc", |
82 | 82 | "body": [
|
83 | 83 | "import React from 'react'",
|
84 | 84 | "",
|
85 |
| - "export interface I${1:${TM_FILENAME_BASE}}Props {", |
| 85 | + "interface Props {", |
86 | 86 | "\t",
|
87 | 87 | "}",
|
88 | 88 | "",
|
89 |
| - "export default function ${1:${TM_FILENAME_BASE}}(): I${1:${TM_FILENAME_BASE}}Props {", |
| 89 | + "export default function ${1:${TM_FILENAME_BASE}}(): Props {", |
90 | 90 | "\treturn (",
|
91 | 91 | "\t\t<div>",
|
92 | 92 | "\t\t\t$0",
|
|
97 | 97 | ],
|
98 | 98 | "description": "Creates a React Functional Component with ES7 module system and TypeScript interface"
|
99 | 99 | },
|
100 |
| - "reactArrowFunctionExportComponent": { |
101 |
| - "prefix": "rafce", |
| 100 | + "typeScriptReactArrowFunctionExportComponent": { |
| 101 | + "prefix": "tsrafce", |
102 | 102 | "body": [
|
103 | 103 | "import React from 'react'",
|
104 | 104 | "",
|
105 |
| - "export interface I${1:${TM_FILENAME_BASE}}Props {", |
| 105 | + "interface Props {", |
106 | 106 | "\t",
|
107 | 107 | "}",
|
108 | 108 | "",
|
109 |
| - "const ${1:${TM_FILENAME_BASE}}: React.FC<I${1:${TM_FILENAME_BASE}}Props> = () => {", |
| 109 | + "const ${1:${TM_FILENAME_BASE}}: React.FC<Props> = () => {", |
110 | 110 | "\treturn (",
|
111 | 111 | "\t\t<div>",
|
112 | 112 | "\t\t\t$0",
|
|
119 | 119 | ],
|
120 | 120 | "description": "Creates a React Arrow Function Component with ES7 module system and TypeScript interface"
|
121 | 121 | },
|
122 |
| - "reactArrowFunctionComponent": { |
123 |
| - "prefix": "rafc", |
| 122 | + "typeScriptReactArrowFunctionComponent": { |
| 123 | + "prefix": "tsrafc", |
124 | 124 | "body": [
|
125 | 125 | "import React from 'react'",
|
126 | 126 | "",
|
127 |
| - "export interface I${1:${TM_FILENAME_BASE}}Props {", |
| 127 | + "interface Props {", |
128 | 128 | "\t",
|
129 | 129 | "}",
|
130 | 130 | "",
|
131 |
| - "export const ${1:${TM_FILENAME_BASE}}: React.FC<I${1:${TM_FILENAME_BASE}}Props> = () => {", |
| 131 | + "export const ${1:${TM_FILENAME_BASE}}: React.FC<Props> = () => {", |
132 | 132 | "\treturn (",
|
133 | 133 | "\t\t<div>",
|
134 | 134 | "\t\t\t$0",
|
|
139 | 139 | ],
|
140 | 140 | "description": "Creates a React Arrow Function Component with ES7 module system and TypeScript interfaces"
|
141 | 141 | },
|
142 |
| - "reactClassPureComponent": { |
143 |
| - "prefix": "rpc", |
| 142 | + "typeScriptReactClassPureComponent": { |
| 143 | + "prefix": "tsrpc", |
144 | 144 | "body": [
|
145 | 145 | "import React, { PureComponent } from 'react'",
|
146 | 146 | "",
|
147 |
| - "export interface I${1:${TM_FILENAME_BASE}}Props {", |
| 147 | + "interface Props {", |
148 | 148 | "\t",
|
149 | 149 | "}",
|
150 | 150 | "",
|
151 |
| - "export default class ${1:${TM_FILENAME_BASE}} extends PureComponent<I${1:${TM_FILENAME_BASE}}Props> {", |
| 151 | + "export default class ${1:${TM_FILENAME_BASE}} extends PureComponent<Props> {", |
152 | 152 | "\trender() {",
|
153 | 153 | "\t\treturn (",
|
154 | 154 | "\t\t\t<div>",
|
|
161 | 161 | ],
|
162 | 162 | "description": "Creates a React pure component class with ES7 module system and TypeScript interface"
|
163 | 163 | },
|
164 |
| - "reactClassExportPureComponent": { |
165 |
| - "prefix": "rpce", |
| 164 | + "typeScriptReactClassExportPureComponent": { |
| 165 | + "prefix": "tsrpce", |
166 | 166 | "body": [
|
167 | 167 | "import React, { PureComponent } from 'react'",
|
168 | 168 | "",
|
169 |
| - "export interface I${1:${TM_FILENAME_BASE}}Props {", |
| 169 | + "interface Props {", |
170 | 170 | "\t",
|
171 | 171 | "}",
|
172 | 172 | "",
|
173 |
| - "class ${1:${TM_FILENAME_BASE}} extends PureComponent<I${1:${TM_FILENAME_BASE}}Props> {", |
| 173 | + "class ${1:${TM_FILENAME_BASE}} extends PureComponent<Props> {", |
174 | 174 | "\trender() {",
|
175 | 175 | "\t\treturn (",
|
176 | 176 | "\t\t\t<div>",
|
|
185 | 185 | ],
|
186 | 186 | "description": "Creates a React pure component class with ES7 module system and TypeScript interface"
|
187 | 187 | },
|
188 |
| - "reactFunctionMemoComponent": { |
189 |
| - "prefix": "rmc", |
| 188 | + "typeScriptReactFunctionMemoComponent": { |
| 189 | + "prefix": "tsrmc", |
190 | 190 | "body": [
|
191 | 191 | "import React, { memo } from 'react'",
|
192 | 192 | "",
|
193 |
| - "export interface I${1:${TM_FILENAME_BASE}}Props {", |
| 193 | + "interface Props {", |
194 | 194 | "\t",
|
195 | 195 | "}",
|
196 | 196 | "",
|
197 |
| - "export default memo(function ${1:${TM_FILENAME_BASE}}({}: I${1:${TM_FILENAME_BASE}}Props) {", |
| 197 | + "export default memo(function ${1:${TM_FILENAME_BASE}}({}: Props) {", |
198 | 198 | "\treturn (",
|
199 | 199 | "\t\t<div>",
|
200 | 200 | "\t\t\t$0",
|
|
205 | 205 | ],
|
206 | 206 | "description": "Creates a React Memo Function Component with ES7 module system and TypeScript interface"
|
207 | 207 | },
|
208 |
| - "reactClassCompomentRedux": { |
209 |
| - "prefix": "rcredux", |
| 208 | + "typeScriptReactClassCompomentRedux": { |
| 209 | + "prefix": "tsrcredux", |
210 | 210 | "body": [
|
211 | 211 | "import React, { Component } from 'react'",
|
212 | 212 | "import { connect } from 'react-redux'",
|
213 | 213 | "",
|
214 |
| - "export interface I${1:${TM_FILENAME_BASE}}Props {", |
| 214 | + "interface Props {", |
215 | 215 | "\t",
|
216 | 216 | "}",
|
217 |
| - "export interface I${1:${TM_FILENAME_BASE}}State {", |
| 217 | + "interface State {", |
218 | 218 | "\t",
|
219 | 219 | "}",
|
220 | 220 | "",
|
221 |
| - "export class ${1:${TM_FILENAME_BASE}} extends Component<I${1:${TM_FILENAME_BASE}}Props, I${1:${TM_FILENAME_BASE}}State> {", |
| 221 | + "export class ${1:${TM_FILENAME_BASE}} extends Component<Props, State> {", |
222 | 222 | "\tstate = {}",
|
223 | 223 | "",
|
224 | 224 | "\trender() {",
|
|
0 commit comments