Skip to content

Instantly share code, notes, and snippets.

View MadaShindeInai's full-sized avatar
:electron:
Working from home

Sergei MadaShindeInai

:electron:
Working from home
View GitHub Profile
@MadaShindeInai
MadaShindeInai / classDescription.ts
Last active April 24, 2022 15:49
Complete class defenition/description using Typescript
// interface ensure class instance shape. Notice that the interface includes the parameters of the constructor, not the properties
interface Vehicle {
make: string;
color: string;
doors: number;
accelerate(speed: number): string;
brake(): string;
turn(direction: 'left' | 'right'): string;
}