Skip to content
This repository was archived by the owner on Jan 13, 2022. It is now read-only.

Commit d301bce

Browse files
author
Yang Su
committed
Added arrayInstanceOf snippet
1 parent 22e05be commit d301bce

File tree

5 files changed

+27
-9
lines changed

5 files changed

+27
-9
lines changed

README.md

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,9 @@ Snippets are available for both JSX and CJSX ([React CoffeeScript](https://githu
6565
6666
pt→ propTypes { ... }
6767
68-
pta→ PropTypes.array
68+
pta→ PropTypes.arrayOf
69+
70+
ptai→ PropTypes.arrayOf (Instances)
6971
7072
ptb→ PropTypes.bool
7173
@@ -75,16 +77,16 @@ Snippets are available for both JSX and CJSX ([React CoffeeScript](https://githu
7577
7678
pti→ PropTypes.instanceOf
7779
78-
ptn→ PropTypes.node
79-
8080
ptn→ PropTypes.number
8181
82-
pto→ PropTypes.object
82+
ptn→ PropTypes.node
8383
84-
ptof→ PropTypes.objectOf
84+
pto→ PropTypes.object
8585
8686
ptof→ PropTypes.oneOf (Enum)
8787
88+
ptof→ PropTypes.objectOf
89+
8890
ptoft→ PropTypes.oneOfType (Union)
8991
9092
pts→ PropTypes.string
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<snippet>
2+
<content><![CDATA[
3+
${1}: React.PropTypes.arrayOf(React.PropTypes.instanceOf(${2:Class}))${3:.isRequired}$0
4+
]]></content>
5+
<tabTrigger>ptai</tabTrigger>
6+
<scope>source.coffee</scope>
7+
<description>React: PropTypes.arrayOf (Instances)</description>
8+
</snippet>
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
<snippet>
22
<content><![CDATA[
3-
${1}: React.PropTypes.array${2:.isRequired}$0
3+
${1}: React.PropTypes.arrayOf(${2:propType})${3:.isRequired}$0
44
]]></content>
55
<tabTrigger>pta</tabTrigger>
66
<scope>source.coffee</scope>
7-
<description>React: PropTypes.array</description>
7+
<description>React: PropTypes.arrayOf</description>
88
</snippet>
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<snippet>
2+
<content><![CDATA[
3+
${1}: React.PropTypes.arrayOf(React.PropTypes.instanceOf(${2:Class}))${3:.isRequired}$0
4+
]]></content>
5+
<tabTrigger>ptai</tabTrigger>
6+
<scope>source.js</scope>
7+
<description>React: PropTypes.arrayOf (Instances)</description>
8+
</snippet>
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
<snippet>
22
<content><![CDATA[
3-
${1}: React.PropTypes.array${2:.isRequired}$0
3+
${1}: React.PropTypes.arrayOf(${2:propType})${3:.isRequired}$0
44
]]></content>
55
<tabTrigger>pta</tabTrigger>
66
<scope>source.js</scope>
7-
<description>React: PropTypes.array</description>
7+
<description>React: PropTypes.arrayOf</description>
88
</snippet>

0 commit comments

Comments
 (0)