mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-10-21 02:37:05 +02:00
12 lines
395 B
TypeScript
12 lines
395 B
TypeScript
import { parse } from 'protobufjs';
|
|
import average_definitions from '../../../public/protos/average_definitions.proto';
|
|
import reviews from '../../../public/protos/reviews.proto';
|
|
|
|
export type ProtoSource = keyof typeof protos;
|
|
|
|
const protos = { reviews, average_definitions };
|
|
|
|
export function lookup(source: ProtoSource, type: string) {
|
|
return parse(protos[source]).root.lookupType(type);
|
|
}
|