How to use the tsTypeParameter function from @babel/types
Find comprehensive JavaScript @babel/types.tsTypeParameter code examples handpicked from public code repositorys.
65 66 67 68 69 70 71 72 73 74
parent.node.typeParameters = t.tsTypeParameterDeclaration([]); } let params = parent.get('typeParameters'); let param = params.node.params.find(p => p.default.typeName.name === name); if (!param) { params.pushContainer('params', t.tsTypeParameter(null, t.tsTypeReference(t.identifier(name)), name[0])); } // Replace the reference with the generic, or add a type parameter. if (path.node.name === name) {
+ 13 other calls in file
@babel/types.identifier is the most popular function in @babel/types (20936 examples)