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

Commit 01d21ed

Browse files
committed
🐛 Add suffixes to function type for JSDoc
1 parent 91452e6 commit 01d21ed

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

grammars/javascript.cson

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1952,6 +1952,7 @@
19521952
! | # {function(!string)} non-nullable type
19531953
)?
19541954
[a-zA-Z_$][\\w$]+
1955+
(?:\\[\\])? # {function(string[])} type application, an array of strings
19551956
(?:
19561957
\\s*,\\s*
19571958
(?:
@@ -1961,13 +1962,15 @@
19611962
! | # {function(string, !string)} non-nullable type
19621963
)?
19631964
[a-zA-Z_$][\\w$]+
1965+
(?:\\[\\])? # {function(string[])} type application, an array of strings
19641966
)
19651967
|
19661968
(?:
19671969
\\.{3}[a-zA-Z_$][\\w$]+ # {function(string, ...string)} variable number of parameters
19681970
)
19691971
)
19701972
)*
1973+
=? # {function(string=)} optional parameter
19711974
)*
19721975
\\s*
19731976
\\)
@@ -2102,6 +2105,7 @@
21022105
! | # {function(!string)} non-nullable type
21032106
)?
21042107
[a-zA-Z_$][\\w$]+
2108+
(?:\\[\\])? # {function(string[])} type application, an array of strings
21052109
(?:
21062110
\\s*,\\s*
21072111
(?:
@@ -2111,13 +2115,15 @@
21112115
! | # {function(string, !string)} non-nullable type
21122116
)?
21132117
[a-zA-Z_$][\\w$]+
2118+
(?:\\[\\])? # {function(string[])} type application, an array of strings
21142119
)
21152120
|
21162121
(?:
21172122
\\.{3}[a-zA-Z_$][\\w$]+ # {function(string, ...string)} variable number of parameters
21182123
)
21192124
)
21202125
)*
2126+
=? # {function(string=)} optional parameter
21212127
)*
21222128
\\s*
21232129
\\)

0 commit comments

Comments
 (0)