nishiki-tech / nishiki-frontend

Nishiki is an app for tracking and sharing food inventories within groups for better pantry management.
https://nishiki.tech
MIT License
20 stars 5 forks source link

Add type `null` to optional params in `IFood` #220

Closed nick-y-ito closed 6 months ago

nick-y-ito commented 6 months ago

Description

The IFood currently looks like below, and it's used everywhere. However, some of the parameters of the food are nullable, according to the Web API document. They must match.

src/types/definition.ts

export interface IFood {
  id: string;
  name: string;
  quantity: number;
  category: string;
  unit: string;
  expiry: Date;
  createdAt: Date;
}

Notes

-