How to use the objectTypeIndexer function from @babel/types
Find comprehensive JavaScript @babel/types.objectTypeIndexer code examples handpicked from public code repositorys.
GitHub: deecewan/jsroutes-types
![deecewan profile picture](/deecewan.png?size=40)
87 88 89 90 91 92 93 94 95 96
// but the type builder doesn't understand it. so we build what we can, // and then manually add `optional: true` ...t.objectTypeProperty(t.identifier(arg), t.mixedTypeAnnotation()), optional: true, })); const indexer = t.objectTypeIndexer( t.identifier('query'), t.stringTypeAnnotation(), t.mixedTypeAnnotation(), );
+ 30 other calls in file
@babel/types.identifier is the most popular function in @babel/types (20936 examples)