Skip to content

[type-any] feed-client.ts: 2 unsafe any types in public interfaces #226

@realfishsam

Description

@realfishsam

Risk Level

CRITICAL

File

sdks/typescript/pmxt/feed-client.ts

Findings

  • Line 14: info: anyinfo field in a public-facing feed interface is typed as any; consumers receive no type information about feed metadata
  • Line 47: info: any — second interface also exposes info: any; same problem in a different feed variant

Impact

  • Any consumer accessing .info on a feed object receives any, losing all IDE support, autocomplete, and type safety on the metadata
  • Bugs in feed metadata (wrong field names, missing required fields) will only surface at runtime

Suggested Fix

  • Define a FeedInfo interface with the actual fields present on feed metadata objects (e.g. { name: string; description?: string; ... })
  • Replace both info: any fields with info: FeedInfo
  • If the shape differs between feed types, use a discriminated union or separate FeedInfo variants

Found by automated any type audit

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions