question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Missing parsed information

See original GitHub issue

Parser unfortunately doesn’t return full information about parsed code.

Right now I know about missing

Can we get this fixed, please?

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:9 (9 by maintainers)

github_iconTop GitHub Comments

1reaction
ondratracommented, Aug 28, 2018

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

async function asyncFunction(): Promise<string> {
    return 'result'
}

This function is not explicitely stating async yet it’s returning Promise

function indirectAsyncFunction(): Promise<string> {
    return asyncFunction()
}

This async function calls awaits on another async function.

async function complexAsyncFunction(): Promise<string> {
    return await asyncFunction()
}

Notice difference between indirectAsyncFunction() and complexAsyncFunction(). If you add extra async keyword in front of indirectAsyncFunction without further editation(adding await for asyncFunction()) it would actually return Promise<Promise<string>>.

Because of that I think parser should return async flag only for function that explicitly state it.

0reactions
buehlercommented, Aug 31, 2018

I’m going to close this issue in favor to propper issues for each feature 😃

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found