Created
February 27, 2020 19:32
-
-
Save omarkdev/b16056e95fb9f79e7d4cfb586b583d01 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function showInfo() { | |
return ( | |
target: any, | |
propertyKey: string, | |
parameterIndex: number, | |
) => { | |
console.log('target', target); | |
console.log('property key', propertyKey); | |
console.log('parameter index', parameterIndex); | |
} | |
} | |
class User { | |
changeName( | |
@showInfo() name: string, | |
) {} | |
} | |
// target User { changeName: [Function] } | |
// property key changeName | |
// parameter index 0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment