How to use the stringTypeAnnotation function from @babel/types
Find comprehensive JavaScript @babel/types.stringTypeAnnotation code examples handpicked from public code repositorys.
177 178 179 180 181 182 183 184 185 186
} if (type.indexOf('DataTypes.BIGINT') > -1) { return t.numberTypeAnnotation(); } if (type.indexOf('DataTypes.STRING') > -1) { return t.stringTypeAnnotation(); } if (type.indexOf('DataTypes.CHAR') > -1) { return t.stringTypeAnnotation(); }
23
115
4
+ 63 other calls in file
78 79 80 81 82 83 84 85 86 87
buildInteger() { return bt.numberTypeAnnotation() } buildString() { return bt.stringTypeAnnotation() } buildBoolean() { return bt.booleanTypeAnnotation()
9
40
4
+ 11 other calls in file
GitHub: deecewan/jsroutes-types
71 72 73 74 75 76 77 78 79 80
const validValueId = t.identifier('ValidValue'); const validValueType = t.declareTypeAlias( validValueId, null, t.unionTypeAnnotation([ t.stringTypeAnnotation(), t.numberTypeAnnotation(), t.booleanTypeAnnotation(), stringableValue, ]),
1
3
2
+ 92 other calls in file
@babel/types.identifier is the most popular function in @babel/types (20936 examples)