-
Notifications
You must be signed in to change notification settings - Fork 13.1k
Closed
Description
TypeScript Version: 3.3.0-dev.201xxxxx
Search Terms: decorator this
Code
const dec = function(target, field, argIndex) {
console.log(target, field, argIndex) // outputs {constructor: ƒ, test: ƒ} "test" 1
}
class A {
test(this: any, @dec a) {
console.log(a)
}
}I believe it should be ignored when decorators are used within a function with explicitly typed this(#6739 )
Expected behavior:
expects argIndex index to be 0
Actual behavior:
argIndex index in the decorator is 1
Metadata
Metadata
Assignees
Labels
BugA bug in TypeScriptA bug in TypeScript