How to use the objectTypeIndexer function from @babel/types

Find comprehensive JavaScript @babel/types.objectTypeIndexer code examples handpicked from public code repositorys.

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(),
);
fork icon1
star icon3
watch icon2

+ 30 other calls in file

Other functions in @babel/types

Sorted by popularity

function icon

@babel/types.identifier is the most popular function in @babel/types (20936 examples)