You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
(maybe it shouldn't be called tracer.wrap so as not to make the existing wrap implementation more complicated.. )
// The decorator (probably not declared like this, but just to serve as an example...)tracer.wrap=(name: string): MethodDecorator=>(_target,_propertyKey,descriptor)=>{descriptor.value=tracer.wrap(name,descriptor.value);returndescriptor;};// usage:classMyClass{
@tracer.wrap('fetchExample')fetchExample(): Promise<unknown>{returnfetch('http://example.org');}}
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Would be especially useful for wrapping methods..
(maybe it shouldn't be called
tracer.wrap
so as not to make the existingwrap
implementation more complicated.. )Beta Was this translation helpful? Give feedback.
All reactions