mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-10-22 19:19:52 +02:00
10 lines
249 B
TypeScript
10 lines
249 B
TypeScript
import { lookupProtobufType, ProtoSource } from './lookupProtobufType';
|
|
|
|
export function decodeProtobuf<Type>(
|
|
source: ProtoSource,
|
|
type: string,
|
|
data: Uint8Array,
|
|
) {
|
|
return lookupProtobufType(source, type).decode(data).toJSON() as Type;
|
|
}
|