I have currently:

A Class with multiple functions A Decorator that saves the function to a list

The problem:

When i call the function “this” is not the class ( or not yet initialized )

How can i implement it correctly?

My Class Function Decorator:

export function LemmyOn(data: ILemmyOn) {  

  return function (  
    target: Object,  
    propertyKey: string | symbol,  
    descriptor: TypedPropertyDescriptor<any>  
  ) {  

    events.push({ data: data, fn: descriptor.value });  
    return descriptor;  
  };
}
  • CommunityLinkFixerBotB
    link
    fedilink
    English
    41 year ago

    Hi there! Looks like you linked to a Lemmy community using a URL instead of its name, which doesn’t work well for people on different instances. Try fixing it like this: [email protected]

    • @rmam
      link
      English
      1
      edit-2
      11 months ago

      deleted by creator

      • Rikudou_Sage
        link
        fedilink
        English
        11 year ago

        Hi, new version has been released and it now shouldn’t fix links for Mastodon users, if the link is the same as the community the reply is in. Meaning if you tag other communities, it will reply with links only for them, but it won’t reply if you tag just one community to post into it.