Typing objects
type Profiler = {
logger?: string;
start: Date;
done(info?: string): boolean;
run: () => void;
}Combining object types
type Book = {
_id: string;
price: number;
category: number;
title: string;
description: string;
}
type Pen = {
_id: string;
price: number;
category: number;
brand: string;
type: string;
}Interfaces
Resources
Last updated