mirror of
https://github.com/vercel/next-learn.git
synced 2026-06-11 09:51:47 +00:00
31 lines
653 B
TypeScript
31 lines
653 B
TypeScript
// This file contains type definitions for you data.
|
|
// These describe the shape of the data, and what data type each property should accept.
|
|
|
|
export type User = {
|
|
id: number;
|
|
name: string;
|
|
email: string;
|
|
password: string;
|
|
};
|
|
|
|
export type Customer = {
|
|
id: number;
|
|
name: string;
|
|
email: string;
|
|
imageUrl: string;
|
|
};
|
|
|
|
export type Invoice = {
|
|
id: number;
|
|
customerId: number;
|
|
amount: number;
|
|
status: 'pending' | 'paid'; // In TypeScript, this is called a string union type.
|
|
// It means that the "status" property can only be one of the two strings.
|
|
date: string;
|
|
};
|
|
|
|
export type Revenue = {
|
|
month: string;
|
|
revenue: number;
|
|
};
|