~/talk

TypeScript Decorators - Higher Order Functions in Disguise

Talkat NDC Oslo 2018 · 2018-06-11..06-15· [typescript]
links:none on file
slides:none on file

Step‑by‑step demos show how to implement concrete TypeScript decorators that wrap methods rather than change them: a log decorator that captures args, a memoize decorator that caches promise results with an expiresIn option, a loader pattern that toggles an operation flag for a spinner, and a timeout decorator that races a delayed rejection via Promise.race. Examples use Angular components and promise chains, explain decorator factories for configuration, and suggest applying the same patterns to analytics, retries, instrumentation or server code.

AI-written summary · about

  1. 0:00Introduction
  2. 1:30Power of Composition
  3. 10:00FN arcs
  4. 17:22Decorators
  5. 24:28Memoized example
  6. 28:35Decorators explanation
  7. 34:58Timeout decorators
  8. 37:05Example
  9. 38:34Repetitive Errors
  10. 39:28Errors with Loader
  11. 40:20Error Example
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 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
?
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.