node-typescript-parser icon indicating copy to clipboard operation
node-typescript-parser copied to clipboard

feat: parse inline object types

Open buehler opened this issue 7 years ago • 1 comments

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 }

buehler avatar Aug 31 '18 06:08 buehler

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.)

edalex-ian avatar Dec 16 '22 00:12 edalex-ian