@eagleoutice/flowr - v2.17.4
    Preparing search index...

    Variable Query

    Query: {
        calls(
            this: void,
            results: Partial<QueryResults<"call-context">>,
        ): FoundCall[];
        entries<
            Base extends
                | "search"
                | "project"
                | "linter"
                | "dependencies"
                | "dataflow"
                | "files"
                | "config"
                | "call-context"
                | "does-call"
                | "call-graph"
                | "control-flow"
                | "dataflow-lens"
                | "absint"
                | "normalized-ast"
                | "id-map"
                | "dataflow-cluster"
                | "static-slice"
                | "location-map"
                | "happens-before"
                | "inspect-exception"
                | "inspect-higher-order"
                | "inspect-recursion"
                | "inspect-fn-props"
                | "ambient-access"
                | "resolve-value"
                | "signature"
                | "origin"
                | "provenance"
                | "input-sources"
                | "taint"
                | "dice"
                | "guess-dep-versions"
                | "function-info"
                | "code-clones",
            Type extends
                | "search"
                | "project"
                | "linter"
                | "dependencies"
                | "dataflow"
                | "files"
                | "config"
                | "call-context"
                | "does-call"
                | "call-graph"
                | "control-flow"
                | "dataflow-lens"
                | "absint"
                | "normalized-ast"
                | "id-map"
                | "dataflow-cluster"
                | "static-slice"
                | "location-map"
                | "happens-before"
                | "inspect-exception"
                | "inspect-higher-order"
                | "inspect-recursion"
                | "inspect-fn-props"
                | "ambient-access"
                | "resolve-value"
                | "signature"
                | "origin"
                | "provenance"
                | "input-sources"
                | "taint"
                | "dice"
                | "guess-dep-versions"
                | "function-info"
                | "code-clones",
        >(
            this: void,
            results: QueryResults<Base>,
            type: Type,
        ): [Extract<keyof (...), string>, ValueOf<Type>][];
        first<
            Base extends
                | "search"
                | "project"
                | "linter"
                | "dependencies"
                | "dataflow"
                | "files"
                | "config"
                | "call-context"
                | "does-call"
                | "call-graph"
                | "control-flow"
                | "dataflow-lens"
                | "absint"
                | "normalized-ast"
                | "id-map"
                | "dataflow-cluster"
                | "static-slice"
                | "location-map"
                | "happens-before"
                | "inspect-exception"
                | "inspect-higher-order"
                | "inspect-recursion"
                | "inspect-fn-props"
                | "ambient-access"
                | "resolve-value"
                | "signature"
                | "origin"
                | "provenance"
                | "input-sources"
                | "taint"
                | "dice"
                | "guess-dep-versions"
                | "function-info"
                | "code-clones",
            Type extends
                | "search"
                | "project"
                | "linter"
                | "dependencies"
                | "dataflow"
                | "files"
                | "config"
                | "call-context"
                | "does-call"
                | "call-graph"
                | "control-flow"
                | "dataflow-lens"
                | "absint"
                | "normalized-ast"
                | "id-map"
                | "dataflow-cluster"
                | "static-slice"
                | "location-map"
                | "happens-before"
                | "inspect-exception"
                | "inspect-higher-order"
                | "inspect-recursion"
                | "inspect-fn-props"
                | "ambient-access"
                | "resolve-value"
                | "signature"
                | "origin"
                | "provenance"
                | "input-sources"
                | "taint"
                | "dice"
                | "guess-dep-versions"
                | "function-info"
                | "code-clones",
        >(
            this: void,
            results: QueryResults<Base>,
            type: Type,
        ): ValueOf<Type> | undefined;
        get<
            Base extends
                | "search"
                | "project"
                | "linter"
                | "dependencies"
                | "dataflow"
                | "files"
                | "config"
                | "call-context"
                | "does-call"
                | "call-graph"
                | "control-flow"
                | "dataflow-lens"
                | "absint"
                | "normalized-ast"
                | "id-map"
                | "dataflow-cluster"
                | "static-slice"
                | "location-map"
                | "happens-before"
                | "inspect-exception"
                | "inspect-higher-order"
                | "inspect-recursion"
                | "inspect-fn-props"
                | "ambient-access"
                | "resolve-value"
                | "signature"
                | "origin"
                | "provenance"
                | "input-sources"
                | "taint"
                | "dice"
                | "guess-dep-versions"
                | "function-info"
                | "code-clones",
            Type extends
                | "search"
                | "project"
                | "linter"
                | "dependencies"
                | "dataflow"
                | "files"
                | "config"
                | "call-context"
                | "does-call"
                | "call-graph"
                | "control-flow"
                | "dataflow-lens"
                | "absint"
                | "normalized-ast"
                | "id-map"
                | "dataflow-cluster"
                | "static-slice"
                | "location-map"
                | "happens-before"
                | "inspect-exception"
                | "inspect-higher-order"
                | "inspect-recursion"
                | "inspect-fn-props"
                | "ambient-access"
                | "resolve-value"
                | "signature"
                | "origin"
                | "provenance"
                | "input-sources"
                | "taint"
                | "dice"
                | "guess-dep-versions"
                | "function-info"
                | "code-clones",
        >(
            this: void,
            results: QueryResults<Base>,
            type: Type,
            key: Extract<keyof ResultsOf<Type>>,
        ): ValueOf<Type> | undefined;
        lints(this: void, results: Partial<QueryResults<"linter">>): FoundLint[];
        name: string;
        one<
            Type extends
                | "search"
                | "project"
                | "linter"
                | "dependencies"
                | "dataflow"
                | "files"
                | "config"
                | "call-context"
                | "does-call"
                | "call-graph"
                | "control-flow"
                | "dataflow-lens"
                | "absint"
                | "normalized-ast"
                | "id-map"
                | "dataflow-cluster"
                | "static-slice"
                | "location-map"
                | "happens-before"
                | "inspect-exception"
                | "inspect-higher-order"
                | "inspect-recursion"
                | "inspect-fn-props"
                | "ambient-access"
                | "resolve-value"
                | "signature"
                | "origin"
                | "provenance"
                | "input-sources"
                | "taint"
                | "dice"
                | "guess-dep-versions"
                | "function-info"
                | "code-clones",
        >(
            this: void,
            data: BasicQueryData,
            query: QueryArgumentsWithType<Type>,
        ): Promise<SingleQueryResult<Type>>;
        values<
            Base extends
                | "search"
                | "project"
                | "linter"
                | "dependencies"
                | "dataflow"
                | "files"
                | "config"
                | "call-context"
                | "does-call"
                | "call-graph"
                | "control-flow"
                | "dataflow-lens"
                | "absint"
                | "normalized-ast"
                | "id-map"
                | "dataflow-cluster"
                | "static-slice"
                | "location-map"
                | "happens-before"
                | "inspect-exception"
                | "inspect-higher-order"
                | "inspect-recursion"
                | "inspect-fn-props"
                | "ambient-access"
                | "resolve-value"
                | "signature"
                | "origin"
                | "provenance"
                | "input-sources"
                | "taint"
                | "dice"
                | "guess-dep-versions"
                | "function-info"
                | "code-clones",
            Type extends
                | "search"
                | "project"
                | "linter"
                | "dependencies"
                | "dataflow"
                | "files"
                | "config"
                | "call-context"
                | "does-call"
                | "call-graph"
                | "control-flow"
                | "dataflow-lens"
                | "absint"
                | "normalized-ast"
                | "id-map"
                | "dataflow-cluster"
                | "static-slice"
                | "location-map"
                | "happens-before"
                | "inspect-exception"
                | "inspect-higher-order"
                | "inspect-recursion"
                | "inspect-fn-props"
                | "ambient-access"
                | "resolve-value"
                | "signature"
                | "origin"
                | "provenance"
                | "input-sources"
                | "taint"
                | "dice"
                | "guess-dep-versions"
                | "function-info"
                | "code-clones",
        >(
            this: void,
            results: QueryResults<Base>,
            type: Type,
        ): ValueOf<Type>[];
    }

    Running queries and reading what they reported, without Object.entries and the casts it forces. Reading changes nothing: the results keep the shape they are serialized in.

    Type Declaration

    • calls: function
      • Every call a call-context query found, flat, each carrying the kind and subkind it was found under rather than leaving them as the two levels of record the result nests them in.

        Parameters

        Returns FoundCall[]

    • entries: function
      • Every key and result of one query, typed as that query reports them.

        Type Parameters

        • Base extends
              | "search"
              | "project"
              | "linter"
              | "dependencies"
              | "dataflow"
              | "files"
              | "config"
              | "call-context"
              | "does-call"
              | "call-graph"
              | "control-flow"
              | "dataflow-lens"
              | "absint"
              | "normalized-ast"
              | "id-map"
              | "dataflow-cluster"
              | "static-slice"
              | "location-map"
              | "happens-before"
              | "inspect-exception"
              | "inspect-higher-order"
              | "inspect-recursion"
              | "inspect-fn-props"
              | "ambient-access"
              | "resolve-value"
              | "signature"
              | "origin"
              | "provenance"
              | "input-sources"
              | "taint"
              | "dice"
              | "guess-dep-versions"
              | "function-info"
              | "code-clones"
        • Type extends
              | "search"
              | "project"
              | "linter"
              | "dependencies"
              | "dataflow"
              | "files"
              | "config"
              | "call-context"
              | "does-call"
              | "call-graph"
              | "control-flow"
              | "dataflow-lens"
              | "absint"
              | "normalized-ast"
              | "id-map"
              | "dataflow-cluster"
              | "static-slice"
              | "location-map"
              | "happens-before"
              | "inspect-exception"
              | "inspect-higher-order"
              | "inspect-recursion"
              | "inspect-fn-props"
              | "ambient-access"
              | "resolve-value"
              | "signature"
              | "origin"
              | "provenance"
              | "input-sources"
              | "taint"
              | "dice"
              | "guess-dep-versions"
              | "function-info"
              | "code-clones"

        Parameters

        Returns [Extract<keyof (...), string>, ValueOf<Type>][]

    • first: function
      • The one result of a query that was asked for one thing, undefined when it reported none.

        Type Parameters

        • Base extends
              | "search"
              | "project"
              | "linter"
              | "dependencies"
              | "dataflow"
              | "files"
              | "config"
              | "call-context"
              | "does-call"
              | "call-graph"
              | "control-flow"
              | "dataflow-lens"
              | "absint"
              | "normalized-ast"
              | "id-map"
              | "dataflow-cluster"
              | "static-slice"
              | "location-map"
              | "happens-before"
              | "inspect-exception"
              | "inspect-higher-order"
              | "inspect-recursion"
              | "inspect-fn-props"
              | "ambient-access"
              | "resolve-value"
              | "signature"
              | "origin"
              | "provenance"
              | "input-sources"
              | "taint"
              | "dice"
              | "guess-dep-versions"
              | "function-info"
              | "code-clones"
        • Type extends
              | "search"
              | "project"
              | "linter"
              | "dependencies"
              | "dataflow"
              | "files"
              | "config"
              | "call-context"
              | "does-call"
              | "call-graph"
              | "control-flow"
              | "dataflow-lens"
              | "absint"
              | "normalized-ast"
              | "id-map"
              | "dataflow-cluster"
              | "static-slice"
              | "location-map"
              | "happens-before"
              | "inspect-exception"
              | "inspect-higher-order"
              | "inspect-recursion"
              | "inspect-fn-props"
              | "ambient-access"
              | "resolve-value"
              | "signature"
              | "origin"
              | "provenance"
              | "input-sources"
              | "taint"
              | "dice"
              | "guess-dep-versions"
              | "function-info"
              | "code-clones"

        Parameters

        Returns ValueOf<Type> | undefined

    • get: function
      • The result of one query under one key, undefined when it reported none.

        Type Parameters

        • Base extends
              | "search"
              | "project"
              | "linter"
              | "dependencies"
              | "dataflow"
              | "files"
              | "config"
              | "call-context"
              | "does-call"
              | "call-graph"
              | "control-flow"
              | "dataflow-lens"
              | "absint"
              | "normalized-ast"
              | "id-map"
              | "dataflow-cluster"
              | "static-slice"
              | "location-map"
              | "happens-before"
              | "inspect-exception"
              | "inspect-higher-order"
              | "inspect-recursion"
              | "inspect-fn-props"
              | "ambient-access"
              | "resolve-value"
              | "signature"
              | "origin"
              | "provenance"
              | "input-sources"
              | "taint"
              | "dice"
              | "guess-dep-versions"
              | "function-info"
              | "code-clones"
        • Type extends
              | "search"
              | "project"
              | "linter"
              | "dependencies"
              | "dataflow"
              | "files"
              | "config"
              | "call-context"
              | "does-call"
              | "call-graph"
              | "control-flow"
              | "dataflow-lens"
              | "absint"
              | "normalized-ast"
              | "id-map"
              | "dataflow-cluster"
              | "static-slice"
              | "location-map"
              | "happens-before"
              | "inspect-exception"
              | "inspect-higher-order"
              | "inspect-recursion"
              | "inspect-fn-props"
              | "ambient-access"
              | "resolve-value"
              | "signature"
              | "origin"
              | "provenance"
              | "input-sources"
              | "taint"
              | "dice"
              | "guess-dep-versions"
              | "function-info"
              | "code-clones"

        Parameters

        Returns ValueOf<Type> | undefined

    • lints: function
    • name: string
    • one: function
      • Run a single query and answer with what it reported, without grouping, retries, or a QueryResults to index into. For a query marked SupportedQuery#perQueryResults, this is the one entry of its results, e.g. the slice and reconstruction of a static-slice query. A failing query throws. Other than executeQueries, it does not retry and merges nothing, so give it exactly one query. Virtual queries (like compound) are not supported, as they unfold into several queries, so use executeQueries for them. Most callers want analyzer.query(query), which does the same for an analyzer and also applies the gas bounds of the call.

        Type Parameters

        • Type extends
              | "search"
              | "project"
              | "linter"
              | "dependencies"
              | "dataflow"
              | "files"
              | "config"
              | "call-context"
              | "does-call"
              | "call-graph"
              | "control-flow"
              | "dataflow-lens"
              | "absint"
              | "normalized-ast"
              | "id-map"
              | "dataflow-cluster"
              | "static-slice"
              | "location-map"
              | "happens-before"
              | "inspect-exception"
              | "inspect-higher-order"
              | "inspect-recursion"
              | "inspect-fn-props"
              | "ambient-access"
              | "resolve-value"
              | "signature"
              | "origin"
              | "provenance"
              | "input-sources"
              | "taint"
              | "dice"
              | "guess-dep-versions"
              | "function-info"
              | "code-clones"

        Parameters

        Returns Promise<SingleQueryResult<Type>>

        const { slice, reconstruct } = await Query.one({ analyzer }, { type: 'static-slice', criteria: ['2@x'] });
        
    • values: function
      • Every result of one query, for when the keys are not what you are after.

        Type Parameters

        • Base extends
              | "search"
              | "project"
              | "linter"
              | "dependencies"
              | "dataflow"
              | "files"
              | "config"
              | "call-context"
              | "does-call"
              | "call-graph"
              | "control-flow"
              | "dataflow-lens"
              | "absint"
              | "normalized-ast"
              | "id-map"
              | "dataflow-cluster"
              | "static-slice"
              | "location-map"
              | "happens-before"
              | "inspect-exception"
              | "inspect-higher-order"
              | "inspect-recursion"
              | "inspect-fn-props"
              | "ambient-access"
              | "resolve-value"
              | "signature"
              | "origin"
              | "provenance"
              | "input-sources"
              | "taint"
              | "dice"
              | "guess-dep-versions"
              | "function-info"
              | "code-clones"
        • Type extends
              | "search"
              | "project"
              | "linter"
              | "dependencies"
              | "dataflow"
              | "files"
              | "config"
              | "call-context"
              | "does-call"
              | "call-graph"
              | "control-flow"
              | "dataflow-lens"
              | "absint"
              | "normalized-ast"
              | "id-map"
              | "dataflow-cluster"
              | "static-slice"
              | "location-map"
              | "happens-before"
              | "inspect-exception"
              | "inspect-higher-order"
              | "inspect-recursion"
              | "inspect-fn-props"
              | "ambient-access"
              | "resolve-value"
              | "signature"
              | "origin"
              | "provenance"
              | "input-sources"
              | "taint"
              | "dice"
              | "guess-dep-versions"
              | "function-info"
              | "code-clones"

        Parameters

        Returns ValueOf<Type>[]

    api

    const out = await executeQueries({ analyzer }, [{ type: 'static-slice', criteria: ['2@x'] }]);
    Query.get(out, 'static-slice', '2@x'); // the slice taken at `2@x`
    Query.first(out, 'static-slice'); // the only slice, when one was asked for
    for(const [criterion, slice] of Query.entries(out, 'static-slice')) { ... }