Skip to content

tsgo probe: functions without return type annotation resolve to unknown #977

@milkyskies

Description

@milkyskies

When a .ts file has a function without an explicit return type annotation (relying on TS inference), the tsgo probe cannot resolve the return type and the Floe checker sees it as unknown.

Example:

// This works — explicit return type
export function useJiraIssues(...): UseQueryResult<IssueDto[], Error> { ... }

// This doesn't — inferred return type resolves to unknown in Floe
export function useJiraIssues(...) { return useQuery({ ... }); }

This causes cascading unknown types for destructured bindings (data, isLoading, error) and downstream type errors.

The tsgo probe generation needs to handle inferred return types, likely by probing the function's return value directly rather than relying on the declaration's type annotation.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions