@etsoo/smarterp-core
Version:
TypeScript APIs for SmartERP Core
32 lines (31 loc) • 997 B
TypeScript
import type { ErrorObject } from "ajv";
/**
* Core utilities
*/
export declare namespace CoreUtils {
/**
* Get avatar styles
* 获取头像样式
* @param isOrg Is this an organization avatar?
* @returns Styles
*/
function avatarStyles(isOrg?: boolean): React.CSSProperties;
/**
* Merge an array with another array, starting from the end
* 合并数组,从末尾开始
* @param source Source array
* @param target Target array
*/
function mergeArray(source: string[], target: string[]): void;
/**
* Validate JSON input against a schema
* 验证 JSON 输入是否符合架构
* @param schema JSON schema to validate against
* @param input JSON input to validate
* @returns Result
*/
function validateJson(schema: string | object, input: string | object | null | undefined): Promise<[
boolean,
ErrorObject<string, Record<string, any>, unknown>[] | null | undefined
]>;
}