~/talk

Composition Over Inheritance in TypeScript

Talkat JS Poland 2024 · on Thursday, 2024-11-07· [typescript, software-architecture]
links:none on file
slides:none on file

Argues that replacing deep class hierarchies with small injectable components reduces fragility and improves testability, showing TypeScript code patterns: extracting interfaces, wiring behavior via dependency injection, and composing behavior with higher-order functions and simple function composition. Demonstrates a Jedi role example that lets one object hold many roles instead of extending many subclasses, and notes inheritance still fits stable DTO-like shapes; composition yields easier reuse and smaller, easier-to-test units.

AI-written summary · about

  1. 0:00Introduction and speaker intro
  2. 1:56Inheritance problems explained
  3. 4:48Composition basics and benefits
  4. 8:29Implementing composition in TypeScript
  5. 10:40When inheritance makes sense
  6. 12:27Conclusion and Q&A
~/search
type to search 8,222 conferences, 162,397 speakers and 219,688 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
← →
on a talk: 5 seconds back / forward
0–9
on a talk: jump to 0%–90% of the recording
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.