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
{{ message }}
Repository navigation
Visitor plugin not called for decorator node #1626
// plugin.tsimport*astsfrom"typescript";import*aststlfrom"typescript-to-lua";console.log("Plugin is being loaded!");constplugin: tstl.Plugin={visitors: {[ts.SyntaxKind.Decorator]: (node,context) : tstl.Node[]=>{console.log("Found decorator:",node.getText());// Didn't see it in the consolereturncontext.superTransformNode(node);}},};exportdefaultplugin;
Current tstl implementation does not directly visit decorators, instead, decorators are handled as part of the class visitor. I will have a think about if we want to make some kind of change here, but for now you can get the decorators like this:
Activity
[-]plugin error with[/-][+]Visitor plugin not called for decorator node[/+]Perryvw commentedon Mar 26, 2025
Current tstl implementation does not directly visit decorators, instead, decorators are handled as part of the class visitor. I will have a think about if we want to make some kind of change here, but for now you can get the decorators like this: