Closed brad-jones closed 7 years ago
Ok so this is actually a bit of a challenge. At first I was thinking I can just use the exiting NodeHook but then we find ourselves with some interesting circular dependency issues to solve. ie: The NodeHook needs to load the visitors, and then the TypeScript visitors need to be transpiled but the NodeHook will then attempt to transpile those Visitors using result of their own transpilation and ultimately end up with a Stack Overflow exception.
Given glob paths to un-compiled TypeScript visitor modules, When I load those modules via
FindByGlob
, Then theAstVisitorFinder
should compile the modules on the fly.Possibly the
NodeHook
class becomes part of thetsos-compiler
project.