@trophyso/node
Version:
NodeJS SDK for the Trophy API
10 lines (9 loc) • 655 B
TypeScript
import type { BaseSchema } from "../../Schema";
import type { ObjectLikeSchema, ObjectLikeUtils } from "./types";
export declare function getObjectLikeUtils<Raw, Parsed>(schema: BaseSchema<Raw, Parsed>): ObjectLikeUtils<Raw, Parsed>;
/**
* object-like utils are defined in one file to resolve issues with circular imports
*/
export declare function withParsedProperties<RawObjectShape, ParsedObjectShape, Properties>(objectLike: BaseSchema<RawObjectShape, ParsedObjectShape>, properties: {
[K in keyof Properties]: Properties[K] | ((parsed: ParsedObjectShape) => Properties[K]);
}): ObjectLikeSchema<RawObjectShape, ParsedObjectShape & Properties>;