Skip to content

core/json ​

Interfaces ​

JsonEnvelope ​

Defined in: venpm/src/core/json.ts:3

Type Parameters ​

Type ParameterDefault type
Tunknown

Properties ​

data? ​
ts
optional data?: T;

Defined in: venpm/src/core/json.ts:6

error? ​
ts
optional error?: ErrorInfo;

Defined in: venpm/src/core/json.ts:5

success ​
ts
success: boolean;

Defined in: venpm/src/core/json.ts:4

warnings? ​
ts
optional warnings?: string[];

Defined in: venpm/src/core/json.ts:7

Functions ​

jsonError() ​

ts
function jsonError(error): JsonEnvelope<never>;

Defined in: venpm/src/core/json.ts:18

Parameters ​

ParameterType
errorErrorInfo

Returns ​

JsonEnvelope<never>


jsonSuccess() ​

ts
function jsonSuccess<T>(data, warnings?): JsonEnvelope<T>;

Defined in: venpm/src/core/json.ts:10

Type Parameters ​

Type Parameter
T

Parameters ​

ParameterType
dataT
warnings?string[]

Returns ​

JsonEnvelope<T>


writeJson() ​

ts
function writeJson(envelope, write?): void;

Defined in: venpm/src/core/json.ts:22

Parameters ​

ParameterType
envelopeJsonEnvelope
write(s) => void

Returns ​

void

Disclaimer — Not affiliated with Discord Inc. or Vencord. Client mods are against Discord's ToS. Use at your own risk.