Click on foo in the left panel of AST explorer, set compiler to typescript, and you'll see a type property in the PropertyDeclaration that you can call .getText() on
[ ] Make sure the TS type overwrites any jsdoc types that a field or variable might have
For fields and variables we can already add the 'simple' TS type by getting the:
node.type.getText()
See: https://astexplorer.net/
Fixture:
Click on
foo
in the left panel of AST explorer, set compiler totypescript
, and you'll see atype
property in thePropertyDeclaration
that you can call.getText()
on