We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 34b647f commit f14fff4Copy full SHA for f14fff4
lib/flow_doctrine.js
@@ -11,6 +11,11 @@ var oneToOne = {
11
}
12
};
13
14
+var literalTypes = {
15
+ 'StringLiteralTypeAnnotation': 'StringLiteral',
16
+ 'NumberLiteralTypeAnnotation': 'NumberLiteral'
17
+};
18
+
19
function flowDoctrine(type) {
20
21
if (type.type in namedTypes) {
@@ -56,6 +61,13 @@ function flowDoctrine(type) {
56
61
name: type.id.name
57
62
58
63
64
65
+ if (type.type in literalTypes) {
66
+ return {
67
+ type: literalTypes[type.type],
68
+ name: type.value
69
+ };
70
+ }
59
71
60
72
73
module.exports = flowDoctrine;
0 commit comments