~/talk

Wrapping it up with Decorators

Talkat ng-conf 2019 · 2019-05-01..05-03· [typescript, angular]
slides:none on file

Covers concrete TypeScript decorator code: a method wrapper that logs "calling <class> <method> with <args>", use of descriptor to replace the method and call apply, a read-only decorator that makes writable false and produces a TypeError when reassigned, and a decorator factory that toggles enumerable for for‑in loops via Object.defineProperty. Explains decorators vs JavaScript proposal (TC39 stage 2) and notes compiled TypeScript differences, with live examples that actually run and fail as shown.

AI-written summary · about

  1. 0:00Start
  2. 4:32Decorator definition
  3. 10:21Property Descriptor
  4. 11:44Example: Read-Only Decorator
  5. 13:10Example: Enumerable Decorator
~/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.