microsoft / microsoft/nova-facade

Command data should be typed as JSON serializable

Open
#146 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
24
Forks
27
Avg merge
1d 7h
Merged PRs (30d)
3

Description

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> {
  // ...
}

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in packages/nova-types/src/nova-commanding.interface.ts, especially the NovaCommand data type and its serialisable-data documentation. Compare the proposed Json shape with the TypeScript issue linked in the report and confirm the intended generic constraint. Done means command data is statically limited to JSON-serialisable values while the interface remains usable.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
api
Issue type
Feature
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.