How to use the createFlowUnionType function from @babel/types

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

56
57
58
59
60
61
62
63
64
65
66
67
  if (t.isTSTypeAnnotation(types[0]) && t.createTSUnionType) {
    return t.createTSUnionType(types);
  }


  if (t.createFlowUnionType) {
    return t.createFlowUnionType(types);
  }


  return t.createUnionTypeAnnotation(types);
}
fork icon0
star icon1
watch icon1

+ 5 other calls in file

116
117
118
119
120
121
122
123
124
125
126
127
  if (t.isTSTypeAnnotation(argumentTypes[0]) && t.createTSUnionType) {
    return t.createTSUnionType(argumentTypes);
  }


  if (t.createFlowUnionType) {
    return t.createFlowUnionType(argumentTypes);
  }


  return t.createUnionTypeAnnotation(argumentTypes);
}
fork icon0
star icon0
watch icon0

Other functions in @babel/types

Sorted by popularity

function icon

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