@huolala-tech/nad-builder
TypeScript icon, indicating that this package has built-in type declarations

1.1.3 • Public • Published

nad-builder · LICENSE codecov

Convert the Java AST to client-side code.

Include

yarn add @huolala-tech/nad-builder

or

npm install @huolala-tech/nad-builder --save

Demo

import { Builder } from '@huolala-tech/nad-builder';

// You don't need to write this manually, as it can be obtained from the Java service.
const defs = {
  routes: [
    {
      name: 'foo',
      bean: 'test.Demo',
      methods: ['POST'],
      patterns: ['/foo'],
      parameters: [{ name: 'id', type: 'java.lang.Long' }],
      returnType: 'java.lang.Long',
    },
  ],
};
const base = 'http://localhost';
const target = 'ts';

const { code } = new Builder({ defs, target, base });

console.log(code); // Output the generated TypeScript code

Readme

Keywords

none

Package Sidebar

Install

npm i @huolala-tech/nad-builder

Weekly Downloads

0

Version

1.1.3

License

MIT

Unpacked Size

590 kB

Total Files

94

Last publish

Collaborators

  • qikang.yuan
  • huolala-fe
  • zhiyang-deng
  • wangdashuai
  • blucass
  • yanagieiichi