node-typescript-parser
node-typescript-parser copied to clipboard
feat: parse inline object types
Related to #79
while parsing property of type Object (e.g. { myProperty: { innerPropery: string } }, the type is not fully parsed and returns values like {\n email: string\n }
Ah yes I've just been battling this. At least the value is still present.
As a result I can simply check for an inline object with type.match(/{.+}/s) and then recursively walk in and use parseSource. (But gee it's a pain that parseSource is async - makes the simple bit of code much more verbose than it should be.)