Missing parsed information
See original GitHub issueParser unfortunately doesn’t return full information about parsed code.
Right now I know about missing
- async flag (https://github.com/buehler/node-typescript-parser/issues/66)
- isStatic flag (https://github.com/buehler/node-typescript-parser/issues/43)
- propertyIsOptional flag (e.g.
{ myProperty?: string }
) - 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 }
I can parse finish parsing by recursive call ofparser.parseSource()
, but it’s very inconvenient
Can we get this fixed, please?
Issue Analytics
- State:
- Created 5 years ago
- Comments:9 (9 by maintainers)
Top Results From Across the Web
Google reports: Parsing error: Missing '}' | WordPress.org
Google Search Console is reporting error: Parsing error: Missing '}' or object member name. We deactivate Accordions and the problem goes away.
Read more >Parsing error: Missing ',' or '}' in Rich Result Test tool by Google
I run this code on Google rich result tool and it shows me this error on line 21-25 Parsing error: Missing ',' or...
Read more >How to resolve parse error when HTTP content-type header is ...
The HTTP content-type header is missing in the request or response message. Resolving The Problem. In order to resolve this issue, one can...
Read more >What's missing in geographical parsing? | SpringerLink
In geoparsing, the place names containing the geographical information are called toponyms, which must first be identified (called geotagging) ...
Read more >What's missing in geographical parsing? - PubMed
The ability to geo-locate events in textual reports represents a valuable source of information in many real-world applications such as emergency responses, ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@buehler Imho it is false. In case you would like to parse TS file and then ‘reconstruct them’ from parsed info you could actually get different code. Some examples follow.
When async is explicitly stated it always has to return Promise. Even TS compiler will force you to return Promise.
This function is not explicitely stating async yet it’s returning Promise
This async function calls awaits on another async function.
Notice difference between
indirectAsyncFunction()
andcomplexAsyncFunction()
. If you add extraasync
keyword in front ofindirectAsyncFunction
without further editation(adding await forasyncFunction()
) it would actually returnPromise<Promise<string>>
.Because of that I think parser should return
async
flag only for function that explicitly state it.I’m going to close this issue in favor to propper issues for each feature 😃