The ability to reply to discussions is limited to PRO members. Want to join in the discussion? Click here to subscribe now.

TypeScript - Understanding Decorators

TypeScript - Understanding Decorators

3:23
Decorators are a feature of TypeScript that are becoming more and more common in many major libraries. This lesson walks you through what decorators are and how to create your own.
Watch this lesson now
Avatar
egghead.io

Decorators are a feature of TypeScript that are becoming more and more common in many major libraries. This lesson walks you through what decorators are and how to create your own.

Avatar
vtechmonkey

I had to set "noImplicitAny" to false in tsconfig.json to get this to compile properly.

Avatar
Sports

I used:

function addAge(age: number) {
    return function(person: any) {

Not sure if there's a class type in typescript. :/

In reply to vtechmonkey
HEY, QUICK QUESTION!
Joel's Head
Why are we asking?