ng-xtend API documentation
    Preparing search index...

    Type Alias XtTypeHandler<Type>

    Handles type-specific operations for a given Type, including JSON serialization, id management, date conversion, display, and cross-type mapping.

    type XtTypeHandler<Type> = {
        createNew(): Type;
        dateFromJson(
            dateAsString: string | null | undefined,
        ): Date | null | undefined;
        dateToJson(date: Date | null | undefined): string | null | undefined;
        fromJson(json: any): void;
        getId(value: Type): any;
        getOrCreateMappingFrom<OtherType>(
            fromTypeName: string,
            registry: XtTypeResolver,
        ): MappingHelper<OtherType, Type> | undefined;
        idField(): keyof Type | null;
        init(context: XtTypeHierarchy): void;
        isDisplayTemplateSet(): boolean;
        numberToCalculate(value: Type): number | undefined;
        safeDuplicate(value: Type): Type;
        stringToDisplay(value: Type): string;
        toJson(value: Type): any;
    }

    Type Parameters

    • Type

    Implemented by

    Index

    Methods