Skip to content

Conversation

lerouxb
Copy link
Collaborator

@lerouxb lerouxb commented Mar 6, 2025

This is extracted from the PoC. It doesn't know anything about what's in the TypeScript files, so should be generically useful.

In the end I added back support for filtering the completions, because while adding more tests I noticed there are just tons of cases where it returns the entire global scope or at least adds the entire global scope to the results. So I'm finding it hard to imagine us ever using this without at least some filtering of some kind.

@lerouxb lerouxb changed the title add ts-autocomplete package feat: add ts-autocomplete package MONGOSH-2033 Mar 6, 2025
@lerouxb lerouxb force-pushed the add-autocomplete-package branch from 4160f3d to e36df0d Compare March 6, 2025 15:10
@lerouxb lerouxb marked this pull request as draft March 7, 2025 15:10
@lerouxb lerouxb marked this pull request as ready for review March 10, 2025 12:24
if (decl) {
// decl's children are things like ['a', ':', 'string'] or ['bb', ':',
// '(p1: number) => void']. So the one at position 2 (zero indexed) is the
// type.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💙

@lerouxb lerouxb merged commit e1ceb6a into main Mar 11, 2025
6 checks passed
@lerouxb lerouxb deleted the add-autocomplete-package branch March 11, 2025 07:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants