github.com/hyperledger/burrow@v0.34.5-0.20220512172541-77f09336001d/js/src/solts/interface.gd.ts.gr.ts (about)

     1  import * as fs from 'fs';
     2  import * as path from 'path';
     3  import ts from 'typescript';
     4  import { printNodes } from './api';
     5  import { callerTypes, createCallerFunction } from './lib/caller';
     6  import { Provider } from './lib/provider';
     7  import { importBurrow } from './lib/syntax';
     8  
     9  const provider = new Provider();
    10  const providerInterface = printNodes(
    11    ts.addSyntheticLeadingComment(
    12      importBurrow('../index'),
    13      ts.SyntaxKind.SingleLineCommentTrivia,
    14      'Generated by solts - run yarn generate:provider to regenerate if solts Provider code is changed',
    15    ),
    16    ...callerTypes,
    17    provider.createInterface(true),
    18    createCallerFunction(provider),
    19  );
    20  
    21  const providerFile = path.join(__dirname, 'interface.gd.ts');
    22  
    23  fs.writeFileSync(providerFile, providerInterface);