Skip to content

Command data should be typed as JSON serializable #146

Description

@alloy

Currently the doc indicates this should be serialisable, but the typing is not constrained in any way. We should consider adding a typing like this one:

type Json =
    | string
    | number
    | boolean
    | null
    | Json[]
    | { [key: string]: Json }
    ;

export interface NovaCommand<TData extends Json> {
  // ...
}

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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