Problem Statement
Classes vs interfaces — which is correct?
Explanation
Interfaces describe the shape (what methods/properties exist). Classes provide the actual code (how they work) and can implement interfaces.
Code Solution
SolutionRead Only
interface Repo { get(id: string): Promise<string> }
class MemoryRepo implements Repo { async get(id: string){ return id; } }