import LocationsRepository from "../entities/locationsRepository"; import Location from "../entities/location"; export class InMemoryLocationRepository implements LocationsRepository { constructor(public locations: Location[] = []) {} getAll(): Location[] { return this.locations; } save(location: Location): void { this.locations.push(location); } }