# type-grpc

> TypeScript GRPC proto generator

Latest version **1.0.0-alpha** (published 2020-12-16) · Apache-2.0 license · 0 weekly downloads

## Install

```sh
npm install type-grpc
pnpm add type-grpc
yarn add type-grpc
bun add type-grpc
```

## Health

**Score 25/100 (F)** — status: abandoned.

Positive: has types; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.0-alpha |
| Published | 2020-12-16 |
| First published | 2020-12-16 |
| Weekly downloads | 0 |
| License | Apache-2.0 |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 40.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 6 |
| Author | Dima Koval |
| Maintainers | dimakoval |
| Keywords | typescript, grpc, generator |

## Links

- npm: https://www.npmjs.com/package/type-grpc
- Repository: https://github.com/DimaKoval/type-grpc
- Homepage: https://github.com/DimaKoval/type-grpc#readme
- Issues: https://github.com/DimaKoval/type-grpc/issues
- npm.io page: https://npm.io/package/type-grpc

## Dependencies (1)

- [typescript-json-schema](https://npm.io/package/typescript-json-schema.md) ^0.42.0

## Alternatives

- [@openai/codex-sdk](https://npm.io/package/@openai/codex-sdk.md) — 731.4K weekly downloads
- [babel-plugin-transform-react-jsx](https://npm.io/package/babel-plugin-transform-react-jsx.md) — 565.0K weekly downloads
- [babel-helper-remove-or-void](https://npm.io/package/babel-helper-remove-or-void.md) — 508.5K weekly downloads
- [@pnpm/store-controller-types](https://npm.io/package/@pnpm/store-controller-types.md) — 186.9K weekly downloads
- [react-native-signature-canvas](https://npm.io/package/react-native-signature-canvas.md) — 155.6K weekly downloads

## Recent versions

- 1.0.0-alpha (latest) — 2020-12-16

## README

# type-grpc
type-grpc is typescript library to generate grpc service definitions 

## installation

```
npm install type-grpc
```
OR
```
yarn add type-grpc
```

# example
```typescript
import {
  Service,
  RPC,
  Input,
  Message,
  Field,
  Metadata,
  RPCMeta,
} from 'type-grpc';

@Message()
class ServiceMethodResponse {
  @Field()
  uuid: string;

  @Field()
  message: string;
}

@Message()
export class MethodInput {
  @Field()
  name: string;
}

@Service()
export class ServiceName {
  @RPC(type => ServiceMethodResponse, {})
  async methodName(
            @Metadata() metadata: RPCMeta,
            @Input(type => MethodInput, { nullable: true }) input: MethodInput,
  ): Promise<ServiceMethodResponse> {
    return {
      uuid: 'f23fd-434dfs-4324fdsf-43432fd',
      message: `Hello ${input.name}`,
    };
  }
}
```

# warning
this package is under development, so it's not production ready. any contributions in any way is appreciated

---
_Source: https://npm.io/package/type-grpc · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
