Skip to content

[#74] Fix 14 misc TS errors - Validators, helpers, endpoints #79

@Sam-Bolling

Description

@Sam-Bolling

Problem Overview

Miscellaneous files have 14 TypeScript errors across validators, helpers, and endpoint code.

Child of #74

Error Breakdown

edr/helpers.ts (3 errors)

Lines 10, 14, 18: Type mismatch - string values ("now", "latest") not assignable to object

error TS2322: Type 'string' is not assignable to type 'object'

Fix: Update type definition to allow string | object for temporal parameters

endpoint.ts (2 errors)

Lines 632, 633: Same temporal parameter type issue

stac/endpoint.ts (2 errors)

Lines 147, 148: Same temporal parameter type issue

sensorml-validator.ts (3 errors)

Lines 99, 129, 153: Setting warnings property not in ValidationResult type

swe-validator.ts (1 error)

Line 512: Type mismatch - string not assignable to ValidationError

request-builders.spec.ts (1 error)

Line 404: Wrong number of arguments passed to function (expects 1-2, got 3)

sensorml/schema-alignment.spec.ts (1 error)

Line 8: Importing Event that's declared locally but not exported

validation spec files (1 error)

constraint-validator.spec.ts Line 356: Time interval array type mismatch

Solution Strategy

Group fixes by type:

  1. Temporal parameters: Update type definitions to allow string literals
  2. Validation warnings: Add property or use alternative
  3. Function signatures: Fix argument counts
  4. Exports: Add missing export declarations

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions