SheetXL - v0.3.20
    Preparing search index...

    Interface TypedObject<P, T, C>

    TypedObject is a metadata entry that enabled traversing.

    • If a type has properties defined and is an Object then it will be traversed.
    • If a type has arrayType defined and is an Array then it will be traversed.
    interface TypedObject<P, T, C> {
        arrayType?: TypedObject<T extends E[] ? E : any, P, C>;
        getSubType?: (value: Partial<P>) => TypedObject<P, any, C>;
        merge?: (
            update: Partial<P> | ((original: P) => T),
            original: T,
            context: C,
        ) => Partial<P>;
        properties?: TypedObject.Properties<Partial<P>, C>;
        shorthand?: (shorthand: string | Partial<P>, context: C) => Partial<P>;
    }

    Type Parameters

    • P
    • T
    • C
    Index

    Properties

    arrayType?: TypedObject<T extends E[] ? E : any, P, C>

    If the type is an array it can have an arrayType. This should only be defined if the current TypeObject is an array. This would be the un-arrayed type

    getSubType?: (value: Partial<P>) => TypedObject<P, any, C>

    Used for a determining a sub type based on the value.

    Type declaration

      • (value: Partial<P>): TypedObject<P, any, C>
      • Parameters

        • value: Partial<P>

          The value to determine the subtype for.

        Returns TypedObject<P, any, C>

        Another TypedObject

    merge?: (
        update: Partial<P> | ((original: P) => T),
        original: T,
        context: C,
    ) => Partial<P>

    Returns a new T that is the result of merging the update into the original. If this is not defined then the default merging logic will be applied This is used for specialized updates of properties.

    properties?: TypedObject.Properties<Partial<P>, C>

    Define the properties that are available.

    shorthand?: (shorthand: string | Partial<P>, context: C) => Partial<P>

    Returns null if shorthand is not understood.