JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 43
  • Score
    100M100P100Q102793F
  • License MIT

pyRPC TypeScript type definitions - generated by pyrpc codegen

Package Exports

  • @pyrpc/types

Readme

@pyrpc/types

TypeScript type definitions for pyRPC. Generated by pyrpc dev or pyrpc codegen - reflects your actual Python backend procedures at compile time.

Distribution modes

When you npm install @pyrpc/types, the postinstall script prompts you to choose a distribution mode:

Workspace mode

Types are written directly by the server-side pyrpc dev / pyrpc codegen commands into node_modules/@pyrpc/types/src/index.ts. The postinstall creates pyrpc-client.json with distribution: "workspace" and types are generated during development.

Server mode

Types are fetched from a running pyRPC server. The postinstall prompts for a server_url, fetches the schema from {server_url}/rpc, generates types immediately, and creates pyrpc-client.json.

By default, types are written to {client_root}/node_modules/@pyrpc/types/src/index.ts, where client_root is configured in pyrpc.json.

Before codegen runs, Types resolves to an empty interface. After codegen, it resolves to your actual procedure signatures - full autocompletion, no boilerplate.

Manual generation

pyrpc codegen http://localhost:8000

License

MIT