UNPKG

wechaty-puppet-service

Version:
14 lines 443 B
import { puppet, } from 'wechaty-grpc'; /** * Huan(202003): * @chatie/GRPC proto gen TS does not generate the ENUM type with reverse mapping. * So we need to do it by ourselves: * 1. define the EventTypeRev, and * 2. loop EventType to fill it. */ export const EventTypeRev = {}; for (const key in puppet.EventType) { const val = puppet.EventType[key]; EventTypeRev[val] = key; } //# sourceMappingURL=event-type-rev.js.map