data-cap
    Preparing search index...

    Type Alias FindingLocation

    FindingLocation:
        | { kind: "none" }
        | {
            capability: FindingLocationCapability;
            kind: "capability";
            position?: SourcePosition;
        }
        | {
            capability: FindingLocationCapability;
            field: readonly string[];
            indeterminateSites?: readonly SourceLocation[];
            kind: "field";
            position?: SourcePosition;
        }
        | {
            capability: FindingLocationCapability;
            kind: "operation";
            operation: string;
            position?: SourcePosition;
        }
        | {
            capability: FindingLocationCapability;
            kind: "consumer";
            source: string;
        }

    Where a finding points, as a discriminated union -- never a formatted string a consumer would have to parse back apart. Ships with only the variants findings.ts's actual emission sites produce today ("capability"/"field"/"consumer"/"none"); "operation" is included because ReportFinding.operation is already part of that type's public shape, even though no current finding populates it -- trivially reachable the day one does, not a guess about what it would look like. "capability"/"field"/"operation" carry an optional position (ADR 0052) -- the declaration site's own position, when the source ReportFinding.position was populated; "consumer" doesn't, since it locates a consuming file, which has no single declaration position the way a capability/field/operation's own declaration does.

    Type Declaration

    • { kind: "none" }
    • {
          capability: FindingLocationCapability;
          kind: "capability";
          position?: SourcePosition;
      }
    • {
          capability: FindingLocationCapability;
          field: readonly string[];
          indeterminateSites?: readonly SourceLocation[];
          kind: "field";
          position?: SourcePosition;
      }
      • Readonlycapability: FindingLocationCapability
      • Readonlyfield: readonly string[]
      • Optional ReadonlyindeterminateSites?: readonly SourceLocation[]

        Every candidate access site a "FIELD_ACCESS_INDETERMINATE" finding could actually be about (ADR 0052) -- populated only for that code. Lives here, on the one variant that can carry it, rather than as a flat sibling of location: a field-level finding is the only kind that ever has one. Spans potentially multiple consuming files, so each entry carries its own file (SourceLocation, not just SourcePosition).

      • Readonlykind: "field"
      • Optional Readonlyposition?: SourcePosition
    • {
          capability: FindingLocationCapability;
          kind: "operation";
          operation: string;
          position?: SourcePosition;
      }
    • { capability: FindingLocationCapability; kind: "consumer"; source: string }