How to use the tSPropertySignature function from @babel/types

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

121
122
123
124
125
126
127
128
129
130
if (path.isIdentifier({ name: 'IOpenAPI' }) && path.parent.type === 'TSInterfaceDeclaration') {
  path.parentPath
    .get('body')
    .pushContainer(
      'body',
      t.tSPropertySignature(
        t.identifier(apiInstanceName),
        t.tsTypeAnnotation(t.tsTypeReference(t.identifier(apiClassType))),
      ),
    );
fork icon24
star icon78
watch icon2

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