interface FormType {
    calcBoundingBox: () => Promise<Rect>;
    destroy: () => Promise<void>;
    getCount: () => Promise<number>;
    getDoc: () => Promise<null | DocType>;
    getObjectByIndex: (index: number) => Promise<null | PageObjectType>;
    getObjectIndex: (obj: PageObjectType) => Promise<number>;
    options: Options;
}

Implemented by

Properties

calcBoundingBox: () => Promise<Rect>

Calculate the bounding box of the form.

Type declaration

    • (): Promise<Rect>
    • Returns Promise<Rect>

      Return the bounding box.

destroy: () => Promise<void>

Destroy the current object.

Type declaration

    • (): Promise<void>
    • Returns Promise<void>

getCount: () => Promise<number>

Get the count of the form.

Type declaration

    • (): Promise<number>
    • Returns Promise<number>

      Return the count of the form.

getDoc: () => Promise<null | DocType>

Get the doc of the form.

Type declaration

    • (): Promise<null | DocType>
    • Returns Promise<null | DocType>

      Return the doc.

getObjectByIndex: (index: number) => Promise<null | PageObjectType>

Get the object by index.

Type declaration

    • (index: number): Promise<null | PageObjectType>
    • Parameters

      • index: number

        The index of the object.

      Returns Promise<null | PageObjectType>

      Return the object at the specified index.

getObjectIndex: (obj: PageObjectType) => Promise<number>

Get the index of the object in the form.

Type declaration

options: Options

The options to create a Form instance.