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.

Heuristic/loose completions for the 'any' type

See original GitHub issue

Motivation

Today, if you have a value of type ‘any’, dotting off of the value and requesting members for completion will return nothing back. The original motivation for this was that we should never risk giving users incorrect completions.

This is great for a fully typed TypeScript project. However, for those migrating to TypeScript, as well as those who need to drop down to any fairly frequently, this can be slightly frustrating.

For those used to the JS editing experience in editors like Sublime where they just “got completions”, the current behavior might be seen as unattractive.

Proposal

We should consider adding a language service option for users to get “loose” completions akin to what we give in the Salsa language service.

We can still keep the warning for each completion, but we should provide completions with a builder.

Issue Analytics

  • State:open
  • Created 8 years ago
  • Reactions:1
  • Comments:8 (7 by maintainers)

github_iconTop GitHub Comments

3reactions
basaratcommented, Jul 30, 2019

https://github.com/microsoft/TypeScript/issues/5334#issuecomment-516265598 suspect this isn’t TypeScript powered but vscode text-word-reuse (not actual name) powered

0reactions
DanielRosenwassercommented, Jul 30, 2019

Yup, VS Code will give word completions in a .ts file, but only if you explicitly trigger it. You can see the difference if you use a comment.

image

image

That said…VS Code’s word completions are pretty good. I requested this back when Visual Studio was our primary editor. Maybe we should roll with the current behavior?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Heuristic shortest hyperpaths in cell signaling hypergraphs
We show the heuristic finds provably optimal hyperpaths for the class of singleton-tail hypergraphs, and also give a practical algorithm for ...
Read more >
Usability heuristic frameworks: which one is right for you?
In this article, I explore, categorize, and standardize heuristic evaluation methodologies and data visualization to help inform which method to choose.
Read more >
(PDF) Ordered Minimum Completion Time Heuristic for ...
1. Unmapped task are placed into a list in a random sequence;. 2. The first task is allocated to the minimum execution time...
Read more >
Heuristic and Exact Algorithms for the Two-Machine Just in ...
Abstract. The problem addressed in this paper is the two-machine job shop scheduling problem when the objective is to minimize the total ...
Read more >
A FLUID HEURISTIC FOR MINIMIZING MAKESPAN IN JOB ...
of any job step. A schedule results in departure times of the jobs D j (for job j ∈ r this is at...
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