Skip to content
This repository was archived by the owner on Jan 23, 2026. It is now read-only.
This repository was archived by the owner on Jan 23, 2026. It is now read-only.

Better Type Annotations for Realtime Subscriptions #212

@Marviel

Description

@Marviel

Proposed type addition mockup:

export type ColNames = "name" | "type" | "unit" | "value" | "description";
export type FilterOps = "eq" | "ne" | "gt" | "lt" | "ge" | "le";
export type FilterType = `${ColNames}.${FilterOps}=${string}`;

// works!
const works1: FilterType = "name.eq=hello";
// typeerror (non existent column)
const fails1: FilterType = "name.eq=non-existent-column";
// typeerror (bad syntax)
const fails2: FilterType = "name.eq!!!hello";

It would be nice if the realtime subscription string type could be updated to reflect this.

I would submit a full PR except that I think this has implications for some other template types, which I don't have the personal time to dig into right now.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    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