How to use the tsInterfaceBody function from @babel/types

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

41
42
43
44
45
46
47
48
49
const ast = bt.exportNamedDeclaration(
  bt.tsInterfaceDeclaration(
    bt.identifier(object.name),
    undefined,
    null,
    bt.tsInterfaceBody(fields),
  ),
  []
)
fork icon9
star icon40
watch icon4

+ 7 other calls in file

100
101
102
103
104
105
106
107
108
109
  t.exportNamedDeclaration(
    t.tsInterfaceDeclaration(
      t.identifier(objName),
      null,
      null,
      t.tsInterfaceBody(propLines.trim().split('\n').map(propLineToTypeElem))
    ),
    []
  )
);
fork icon0
star icon0
watch icon7

+ 3 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)