Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save omarkdev/b16056e95fb9f79e7d4cfb586b583d01 to your computer and use it in GitHub Desktop.
Save omarkdev/b16056e95fb9f79e7d4cfb586b583d01 to your computer and use it in GitHub Desktop.
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