simgadget
    Preparing search index...

    Type Alias AXElement

    An element as this library hands one out — what canonicalise produces, and the type index.ts publishes as AXElement. RawAXElement above is the internal, open one, and never leaves the package.

    Closed on purpose, where the type above is open: no index signature, so a caller reaching for element.role is told so by the compiler instead of reading undefined off a field the companion stopped sending. The keys are DESCRIBE_KEYS plus children, and the two must be changed together — canonicalise copies exactly the first list, and pruneTree adds the second.

    Deliberately a type alias and not an interface. TypeScript gives an object alias an implicit index signature and an interface none, so this spelling is what keeps a canonical element assignable back to the open type — every pure helper in this file takes that one, and a canonical element has to go on being a legal argument to all of them.

    type AXElement = {
        AXLabel?: string;
        AXValue?: string | number;
        AXUniqueId?: string;
        type?: string;
        enabled?: boolean;
        frame?: Frame;
        children?: AXElement[];
    }
    Index
    AXLabel?: string
    AXValue?: string | number
    AXUniqueId?: string
    type?: string

    Normalised role vocabulary: "Button", "Switch", "SearchField", ...

    enabled?: boolean
    frame?: Frame
    children?: AXElement[]