Quantcast
Channel: Using TypeScript Decorator on Class Methods implemented as Arrow Function - Stack Overflow
Browsing all 2 articles
Browse latest View live

Answer by hackape for Using TypeScript Decorator on Class Methods implemented...

The problem is decorators are meant for applying to prototype object. If you check the transpiled js, you'll see why it doesn't work.class SomeClass { @LogPerf() public myMethod = ( data: MyData, ):...

View Article



Using TypeScript Decorator on Class Methods implemented as Arrow Function

Disclaimer: I have gone through similar questions posted on SO before. They did help me fix some TypeScript compiler issues. But I couldn't find a working, complete, code example.Problem: I want to use...

View Article
Browsing all 2 articles
Browse latest View live




Latest Images