@imbricate/core
Version:
Imbricate Core, Notebook for Engineers
35 lines (34 loc) • 2.15 kB
TypeScript
/**
* @author WMXPY
* @namespace Document_Property
* @description Triage Base
*/
import { ImbricatePropertyKey } from "../../property/definition";
import { ImbricatePropertyRecord } from "../../property/map";
import { IMBRICATE_PROPERTY_TYPE } from "../../property/type";
import { ImbricatePropertyTriageFunction } from "./definition";
export declare class ImbricateDocumentPropertyTriageBase<Result> {
private readonly _triageFunctionsByKey;
private readonly _triageFunctionsByType;
protected constructor();
/**
* Set triage function for property key,
* This action will override document value based triage functions
*
* @param propertyKey property key
* @param triageFunction triage function
* @returns triage manager
*/
forPropertyKey<T extends IMBRICATE_PROPERTY_TYPE>(propertyKey: ImbricatePropertyKey, triageFunction: ImbricatePropertyTriageFunction<T, Result>): this;
forBinary(triageFunction: ImbricatePropertyTriageFunction<IMBRICATE_PROPERTY_TYPE.BINARY, Result>): this;
forBoolean(triageFunction: ImbricatePropertyTriageFunction<IMBRICATE_PROPERTY_TYPE.BOOLEAN, Result>): this;
forString(triageFunction: ImbricatePropertyTriageFunction<IMBRICATE_PROPERTY_TYPE.STRING, Result>): this;
forNumber(triageFunction: ImbricatePropertyTriageFunction<IMBRICATE_PROPERTY_TYPE.NUMBER, Result>): this;
forMarkdown(triageFunction: ImbricatePropertyTriageFunction<IMBRICATE_PROPERTY_TYPE.MARKDOWN, Result>): this;
forJson(triageFunction: ImbricatePropertyTriageFunction<IMBRICATE_PROPERTY_TYPE.JSON, Result>): this;
forImbriscript(triageFunction: ImbricatePropertyTriageFunction<IMBRICATE_PROPERTY_TYPE.IMBRISCRIPT, Result>): this;
forDate(triageFunction: ImbricatePropertyTriageFunction<IMBRICATE_PROPERTY_TYPE.DATE, Result>): this;
forLabel(triageFunction: ImbricatePropertyTriageFunction<IMBRICATE_PROPERTY_TYPE.LABEL, Result>): this;
forReference(triageFunction: ImbricatePropertyTriageFunction<IMBRICATE_PROPERTY_TYPE.REFERENCE, Result>): this;
protected _collect(properties: ImbricatePropertyRecord): Map<ImbricatePropertyKey, Result>;
}