Skip to content

Commit cfc03c8

Browse files
committed
chore: remove outdated snippets
1 parent 9faab85 commit cfc03c8

3 files changed

+63
-37
lines changed

mocha-javascript.code-snippets

-36
This file was deleted.

typescript-react.code-snippets

+33
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
{
2+
"useState": {
3+
"scope": "javascriptreact,typescriptreact",
4+
"prefix": "rus",
5+
"body": ["const [$1, set${1/(.*)/${1:/capitalize}/}] = useState($2)"],
6+
"description": "useState hook"
7+
},
8+
"onChangeInputText": {
9+
"scope": "javascriptreact,typescriptreact",
10+
"prefix": "rioc",
11+
"body": "onChange={(event) => set$1(event.target.value)}",
12+
"description": "React input text `onChanged` handler"
13+
},
14+
"React Component": {
15+
"scope": "typescriptreact",
16+
"prefix": "rc",
17+
"body": [
18+
"import React, { ReactElement } from 'react'",
19+
"export function $1({$2} : {${2}${3}}): ReactElement { return(<div><div></div></div>) }"
20+
],
21+
"description": "React component"
22+
},
23+
"React Component with children": {
24+
"scope": "typescriptreact",
25+
"prefix": "rcc",
26+
"body": [
27+
"import React, { ReactElement } from 'react'",
28+
"type ${1}Props = WithChildren<{ $2 }>;",
29+
"export function $3({$2, children } : ${1}Props): ReactElement { return(<div><div>{children}</div></div>) }"
30+
],
31+
"description": "React component"
32+
}
33+
}

typescript.code-snippets

+30-1
Original file line numberDiff line numberDiff line change
@@ -1 +1,30 @@
1-
{}
1+
{
2+
"ConditionFunctionGenericType": {
3+
"prefix": "cfn",
4+
"scope": "typescript",
5+
"body": [
6+
"export type ConditionFn<T> = (t: T) => boolean",
7+
],
8+
"description": "Generic Condition Function type definition"
9+
},
10+
"ConditionFunctionConcreteType": {
11+
"prefix": "cfnc",
12+
"scope": "typescript",
13+
"body": [
14+
"export type $1ConditionFn = ConditionFn<$1>",
15+
],
16+
"description": "Concrete Condition Function type definition from Generic type"
17+
},
18+
"ConditionFunctionImplemenation": {
19+
"prefix": "cfni",
20+
"scope": "typescript",
21+
"body": [
22+
"const $1 = (",
23+
"$2: $3",
24+
"): $4 => (x: $5) =>",
25+
"$6"
26+
],
27+
"description": "Concrete Condition Function implementation"
28+
},
29+
30+
}

0 commit comments

Comments
 (0)