Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Abilities to prevent some symbols appeared in the completion list (or auto import) #46806

Closed
5 tasks done
Kingwl opened this issue Nov 15, 2021 · 2 comments
Closed
5 tasks done
Labels
Duplicate An existing issue was already created

Comments

@Kingwl
Copy link
Contributor

Kingwl commented Nov 15, 2021

Suggestion

🔍 Search Terms

completions, auto import

✅ Viability Checklist

My suggestion meets these guidelines:

  • This wouldn't be a breaking change in existing TypeScript/JavaScript code
  • This wouldn't change the runtime behavior of existing JavaScript code
  • This could be implemented without emitting different JS based on the types of the expressions
  • This isn't a runtime feature (e.g. library functionality, non-ECMAScript syntax with JavaScript output, new syntax sugar for JS, etc.)
  • This feature would agree with the rest of TypeScript's Design Goals.

⭐ Suggestion

Add something (jsdoc? modifiers? etc.)to disallow a (or some) symbols be includes in the completion list。

📃 Motivating Example

//// a.ts

/*
* @hiden
*/
export const aaaaa = 1

//// b.ts

aa/*here*/

// The `aaaaa` who has been defined with hidden tag should not be included in the completion list 

💻 Use Cases

//// generated.ts
export type Request = {
//... 
}

// we do not want something like `Request` be included in completions (or auto import)
// because we may do some type level operation before use.
//// foo.d.ts

declare module "foo" {
  export * from "other-module"
}

// we do not want import from 'other-module', it's should from 'foo'.
@andrewbranch
Copy link
Member

Essentially a duplicate of #35395?

@RyanCavanaugh RyanCavanaugh added the Duplicate An existing issue was already created label Nov 16, 2021
@typescript-bot
Copy link
Collaborator

This issue has been marked as a 'Duplicate' and has seen no recent activity. It has been automatically closed for house-keeping purposes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Duplicate An existing issue was already created
Projects
None yet
Development

No branches or pull requests

4 participants