[Idea:] Introduce Super(arg) usage for Fat arrow functions
Posted: 16 Jul 2023, 11:20
Wish => could support Super(arg).
Code:
Currently, => can support 'this' through ths. Maybe it can also support 'Super' usage through Super(ths). Although this time keyword Super acts more similar to a function accepting an extra arg.
Code:
Code: Select all
f(ths)=>ths.fc() ; It seems convenient to support f(ths)=>Super(ths).fc() also.
CCC.Prototype.DefineProp('ff',{call:f})
CCC().ff()
Class CC{
fc(){
OutputDebug("Super")
}
}
Class CCC extends CC{
fc(){
OutputDebug("this")
}
}