How to use the tsIndexSignature function from @babel/types
Find comprehensive JavaScript @babel/types.tsIndexSignature code examples handpicked from public code repositorys.
27 28 29 30 31 32 33 34 35 36
const stringKey = t.identifier('key'); stringKey.typeAnnotation = t.tsTypeAnnotation(t.tsStringKeyword()); properties.push( t.tsIndexSignature([stringKey], t.tsTypeAnnotation(index)), ); } return t.tsTypeLiteral(properties);
2
14
2
+ 23 other calls in file
@babel/types.identifier is the most popular function in @babel/types (20936 examples)