10 lines
206 B
TypeScript
10 lines
206 B
TypeScript
|
export function assert(condition: boolean, msg: string) {
|
||
|
if (!condition) {
|
||
|
throwError(msg);
|
||
|
}
|
||
|
}
|
||
|
|
||
|
export function throwError(msg: string): void {
|
||
|
throw new Error(`[axios-miniprogram]: ${msg}`);
|
||
|
}
|