How to use the isTSTypeLiteral function from @babel/types
Find comprehensive JavaScript @babel/types.isTSTypeLiteral code examples handpicked from public code repositorys.
52 53 54 55 56 57 58 59 60 61
const value = node.literal.value; const type = typeof value; return type.replace(/^./, (c) => c.toUpperCase()); } if (t.isTSAnyKeyword(node) || t.isTSTypeReference(node) || t.isTSTypeLiteral(node)) { // field: any; // field: MyInterface; // field: { prop: string }; return "Object";
0
0
1
+ 25 other calls in file
@babel/types.identifier is the most popular function in @babel/types (20936 examples)