How to use the variance function from @babel/types
Find comprehensive JavaScript @babel/types.variance code examples handpicked from public code repositorys.
139 140 141 142 143 144 145 146 147 148
/** * +KEY: VALUE */ function readOnlyObjectTypeProperty(key: string, value: BabelAST): $FlowFixMe { const prop = t.objectTypeProperty(t.identifier(key), value); prop.variance = t.variance('plus'); return prop; } function stringLiteralTypeAnnotation(value: string): $FlowFixMe {
0
1
3
+ 3 other calls in file
@babel/types.identifier is the most popular function in @babel/types (20936 examples)