Skip to content

Commit 3916883

Browse files
authored
Flow: Recognise [Ss]ymbol as a type (#3388)
1 parent f8f9534 commit 3916883

File tree

3 files changed

+7
-3
lines changed

3 files changed

+7
-3
lines changed

components/prism-flow.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
Prism.languages.insertBefore('flow', 'keyword', {
55
'type': [
66
{
7-
pattern: /\b(?:[Bb]oolean|Function|[Nn]umber|[Ss]tring|any|mixed|null|void)\b/,
7+
pattern: /\b(?:[Bb]oolean|Function|[Nn]umber|[Ss]tring|[Ss]ymbol|any|mixed|null|void)\b/,
88
alias: 'tag'
99
}
1010
]

components/prism-flow.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

tests/languages/flow/type_feature.test

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ String
44
string
55
Boolean
66
boolean
7+
Symbol
8+
symbol
79
Function
810
any
911
mixed
@@ -19,6 +21,8 @@ void
1921
["type", "string"],
2022
["type", "Boolean"],
2123
["type", "boolean"],
24+
["type", "Symbol"],
25+
["type", "symbol"],
2226
["type", "Function"],
2327
["type", "any"],
2428
["type", "mixed"],
@@ -28,4 +32,4 @@ void
2832

2933
----------------------------------------------------
3034

31-
Checks for types.
35+
Checks for types.

0 commit comments

Comments
 (0)