~/talk

Wrapping It Up with Decorators

Talkat ngAtlanta 2019 · on Thursday, 2019-01-10· [angular, typescript, web-platform]
slides:none on file

Shows concrete code: builds a method decorator that re-recorded live coding demonstrates replacing a getCities method with one that returns an Observable-wrapped error, then wires the component to display the error. Explains and uses property descriptors and the Reflect metadata API, outlines a decorator factory to pass a custom error message, and links a StackBlitz example. Covers deprecation, memoization, validation patterns and warns about code smells, so expect runnable examples and tradeoffs rather than abstract definitions.

AI-written summary · about

  1. 0:00Start
  2. 1:37The Decorator Pattern
  3. 2:29Typescript Language Feature
  4. 5:10Decorator Definition
  5. 6:07Method Decorator
  6. 7:16Parameter Decorator
  7. 8:50Verifying Type Information at Runtime
  8. 10:18Demo
  9. 10:29Create a Simple Method Decorator
  10. 12:48Return an Observable
  11. 13:32Regular Method Decorator
  12. 15:59Passing in an Argument to Our Decorator
  13. 18:15Avoid Code Smells
  14. 18:37Core Decorators J / S Repo
  15. 20:45What Is Your Favorite Smash Brothers Character
~/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.