GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing github.com — Visitor plugin not called for decorator node · Issue #1626 · TypeScriptToLua/TypeScriptToLua Open Description// plugin.ts import * as ts from "typescript"; import * as tstl from "typescript-to-lua"; console.log("Plugin is being loaded!"); const plugin: tstl.Plugin = { visitors: { [ts.SyntaxKind.Decorator]: (node, context) : tstl.Node[] => { console.log("Found decorator:", node.getText()); // Didn't see it in the console return context.superTransformNode(node); } }, }; export default plugin; //tsconfig.json "tstl":{ "luaTarget": "JIT", "sourceMapTraceback":true, "luaPlugins": [ { "name": "./plugin.ts" } ] }, "compilerOptions": { "experimentalDecorators": true, } const declareModifier = ( type: LuaModifierType | LuaModifierMotionType, name?: string, ) => (modifier: new () => Partial<CDOTA_Modifier_Lua>) => {}; @declareModifier(LuaModifierType.LUA_MODIFIER_MOTION_NONE) class modifier_npc_recycle implements Partial<CDOTA_Modifier_Lua> { static OnCreated(params: object): void { print(111) } static CheckState(): Partial<Record<modifierstate, boolean>> { return { // [modifierstate.MODIFIER_STATE_INVISIBLE]: true, // [modifierstate.MODIFIER_STATE_NO_HEALTH_BAR]: true, // [modifierstate.MODIFIER_STATE_NO_UNIT_COLLISION]: true, // [modifierstate.MODIFIER_STATE_INVULNERABLE]: true, }; } } Activity
MetadataMetadataAssigneesLabelsNo labels TypeProjectsMilestoneRelationshipsDevelopmentIssue actions |
| You are visitor 01402503 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |