Seeing as someone's done most of the hard work already, wouldn't it be fairly simple to adapt ts-for-gjs with another generator for tern?