How to use the interfaceDeclaration function from @babel/types

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

53
54
55
56
57
58
59
60
61
62
const ast = babel.parse(content);

traverse(ast, traverser);

const stringableId = t.identifier('Stringable');
const stringableType = t.interfaceDeclaration(
  stringableId,
  null,
  [],
  t.objectTypeAnnotation([
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)