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.

type parameters are missing

See original GitHub issue

Hi there - great and very interesting project. But are type parameters selectable?

Using TypeParameter as the selector returns an empty array:

const tsquery = require("@phenomnomnominal/tsquery").tsquery;

const ast = tsquery.ast(`
const saveStateLabelFamily = selectorFamily<string, EntityId>({
  key: "SaveStateLabelFamily",
});
`);

console.log(tsquery(ast, "TypeParameter"));

Pasting my code into the playground at https://tsquery-playground.firebaseapp.com/ reveals that there are no type-specific nodes in the tree. The types look like children of the call expression.

Screen Shot 2021-06-30 at 2 22 17 PM

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:8 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
phenomnomnominalcommented, Jul 1, 2021

Oh, you could totally just use a field selector: CallExpression .typeArguments. I think that should do the trick.

1reaction
ahfarmercommented, Jul 1, 2021

CallExpression .typeArguments is exactly what I was looking for. Thank you 🙏

Read more comments on GitHub >

github_iconTop Results From Across the Web

Order type-dependent parameters are missing for order type
Hi friends, I am getting the error "Order type-dependent parameters are missing for order type " while creatiing Process Order.
Read more >
Why are missing type parameters inferred as unknown in ...
Here it says "if the set of candidate argument types is empty, the inferred type argument for T is T 's constraint." I'm...
Read more >
"Missing type parameters for generic type" gives incorrect ...
I'm trying mypy==0.650 on my codebase (using --strict) and I'm hitting some new positives associated with --disallow-any-generics.
Read more >
SyntaxError: missing formal parameter - JavaScript | MDN
The JavaScript exception "missing formal parameter" occurs when your function declaration is missing valid parameters.
Read more >
Order type-dependent parameters are missing for order type ...
Can anyone let me know, where to make a link between Plant and Production Order Types. Order type-dependent parameters are missing for order ......
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