(data: T, requestId: string)
| 18 | } |
| 19 | |
| 20 | export function okEnvelope<T>(data: T, requestId: string): Envelope<T> { |
| 21 | return { code: 0, msg: 'success', data, request_id: requestId }; |
| 22 | } |
| 23 | |
| 24 | export function errEnvelope(code: number, msg: string, requestId: string): Envelope<null> { |
| 25 | return { code, msg, data: null, request_id: requestId }; |
no outgoing calls