@protoc-gen-go-wasmjs/runtime
v0.0.33
Published
Runtime utilities for protoc-gen-go-wasmjs generated code
Maintainers
Readme
@protoc-gen-go-wasmjs/runtime
Runtime utilities for TypeScript code generated by protoc-gen-go-wasmjs.
Installation
npm install @protoc-gen-go-wasmjs/runtime
# or
pnpm add @protoc-gen-go-wasmjs/runtime
# or
yarn add @protoc-gen-go-wasmjs/runtimeUsage
This package provides shared runtime utilities used by generated TypeScript clients. You typically don't need to import these directly - they're imported automatically by generated code.
Browser Service Manager
Handles WASM service calls in browser environments:
import { BrowserServiceManager } from '@protoc-gen-go-wasmjs/runtime/browser';
const manager = new BrowserServiceManager();
manager.registerService('MyService', myServiceImplementation);
await manager.startProcessing();Schema Types
Type definitions for protobuf schema handling:
import { FieldType, FieldSchema, MessageSchema } from '@protoc-gen-go-wasmjs/runtime/schema';Client Types
Common interfaces for WASM clients:
import { WASMResponse, WasmError } from '@protoc-gen-go-wasmjs/runtime/client';Factory Types
Interfaces for message factory patterns:
import { FactoryResult, FactoryInterface } from '@protoc-gen-go-wasmjs/runtime/types';Patch Types
Types for stateful proxy operations:
import { PatchOperation, MessagePatch, PatchBatch } from '@protoc-gen-go-wasmjs/runtime/types';Tree Shaking
This package is designed for optimal tree shaking. Import only what you need:
// Import everything (not recommended)
import * from '@protoc-gen-go-wasmjs/runtime';
// Import specific modules (recommended)
import { BrowserServiceManager } from '@protoc-gen-go-wasmjs/runtime/browser';
import { FieldType } from '@protoc-gen-go-wasmjs/runtime/schema';TypeScript Support
Full TypeScript support with complete type definitions included.
License
Apache-2.0
