schema-components - v3.7.0
    Preparing search index...

    Type Alias MethodKeysOf<D, P>

    MethodKeysOf: IsRuntimeDoc<D> extends true
        ? string
        : unknown extends D
            ? string
            : HasPathsOrWebhooks<D> extends true
                ? MethodKeysWithFallback<D, P>
                : HttpMethod

    Extract the methods declared on a specific path or webhook item, restricted to the OpenAPI-recognised method set so non-method extension keys (e.g. summary, description, parameters) do not pollute the autocomplete.

    Runtime documents (typed Record<string, unknown>) widen back to string so callers retain the freedom to pass arbitrary method strings without surfacing an HttpMethod constraint at runtime call sites. Untyped documents (unknown) also widen to string so consumers with no static doc info can supply extension methods — the canonical HttpMethod set is informational, not gating, when the document carries no structural information at all.

    When the document declares paths or webhooks but not the specific entry P, the union falls back to HttpMethod so callers can still target an authored operation that compile-time inference happens to miss (e.g. behind a deferred conditional type).

    Type Parameters

    • D
    • P extends string