An overview of TypeScript The composition pattern serves as a more robust, reusable method of writing software, and is almost always preferred to the inheritance pattern.