@protoc-gen-go-wasmjs/runtime 0.0.26 → 0.0.27

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.mts CHANGED
@@ -1,5 +1,5 @@
1
1
  export { BrowserServiceManager } from './browser/index.mjs';
2
- export { BaseDeserializer, BaseSchemaRegistry, FieldSchema, FieldType, MessageSchema } from './schema/index.mjs';
2
+ export { BaseDeserializer, BaseSchemaRegistry, FieldSchema, FieldType, MessageSchema, MessageTypeConstructor, MessageTypeProvider } from './schema/index.mjs';
3
3
  export { ServiceClient, WASMBundle, WASMBundleConfig, WASMResponse, WASMServiceClient, WasmError } from './client/index.mjs';
4
4
  export { b as FactoryInterface, a as FactoryMethod, F as FactoryResult } from './factory-DqksufjU.mjs';
5
5
  export { ChangeTransport, MessagePatch, PatchBatch, PatchOperation, PatchResponse, PatchSource } from './types/index.mjs';
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  export { BrowserServiceManager } from './browser/index.js';
2
- export { BaseDeserializer, BaseSchemaRegistry, FieldSchema, FieldType, MessageSchema } from './schema/index.js';
2
+ export { BaseDeserializer, BaseSchemaRegistry, FieldSchema, FieldType, MessageSchema, MessageTypeConstructor, MessageTypeProvider } from './schema/index.js';
3
3
  export { ServiceClient, WASMBundle, WASMBundleConfig, WASMResponse, WASMServiceClient, WasmError } from './client/index.js';
4
4
  export { b as FactoryInterface, a as FactoryMethod, F as FactoryResult } from './factory-DqksufjU.js';
5
5
  export { ChangeTransport, MessagePatch, PatchBatch, PatchOperation, PatchResponse, PatchSource } from './types/index.js';
@@ -35,6 +35,13 @@ interface MessageSchema {
35
35
  oneofGroups?: string[];
36
36
  }
37
37
 
38
+ /**
39
+ * Interface for types that have a static MESSAGE_TYPE field
40
+ * This allows us to infer the message type from the class itself
41
+ */
42
+ interface MessageTypeProvider {
43
+ readonly MESSAGE_TYPE: string;
44
+ }
38
45
  /**
39
46
  * Constructor type that provides MESSAGE_TYPE
40
47
  * Used as a constraint for generic deserialization
@@ -124,4 +131,4 @@ declare class BaseSchemaRegistry {
124
131
  getOneofFields(messageType: string, oneofGroup: string): FieldSchema[];
125
132
  }
126
133
 
127
- export { BaseDeserializer, BaseSchemaRegistry, type FieldSchema, FieldType, type MessageSchema };
134
+ export { BaseDeserializer, BaseSchemaRegistry, type FieldSchema, FieldType, type MessageSchema, type MessageTypeConstructor, type MessageTypeProvider };
@@ -35,6 +35,13 @@ interface MessageSchema {
35
35
  oneofGroups?: string[];
36
36
  }
37
37
 
38
+ /**
39
+ * Interface for types that have a static MESSAGE_TYPE field
40
+ * This allows us to infer the message type from the class itself
41
+ */
42
+ interface MessageTypeProvider {
43
+ readonly MESSAGE_TYPE: string;
44
+ }
38
45
  /**
39
46
  * Constructor type that provides MESSAGE_TYPE
40
47
  * Used as a constraint for generic deserialization
@@ -124,4 +131,4 @@ declare class BaseSchemaRegistry {
124
131
  getOneofFields(messageType: string, oneofGroup: string): FieldSchema[];
125
132
  }
126
133
 
127
- export { BaseDeserializer, BaseSchemaRegistry, type FieldSchema, FieldType, type MessageSchema };
134
+ export { BaseDeserializer, BaseSchemaRegistry, type FieldSchema, FieldType, type MessageSchema, type MessageTypeConstructor, type MessageTypeProvider };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@protoc-gen-go-wasmjs/runtime",
3
- "version": "0.0.26",
3
+ "version": "0.0.27",
4
4
  "description": "Runtime utilities for protoc-gen-go-wasmjs generated code",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",