Skip to content

JSDoc for file/directory autocompletionΒ #43445

@stvnkr

Description

@stvnkr

Suggestion

πŸ” Search Terms

directory autocompletion
file autocompletion
path autocompletion
path intellisense
cwd autocompletion

βœ… 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

An new JSDoc like /* @ts-ignore */ for directory/file autocompletion for an folder (e.g. default: cwd)
e.g.:
Plugin Options:

interface PluginOptions {
  /* @ts-path-autocompletion (optional define path; default: cwd) */
  file: string
}

πŸ“ƒ Motivating Example

It can help to choose the path instead of typing it.
And maybe warn if the path does not exist. (Disabling would be handy for files and folders that are still being created)

πŸ’» Use Cases

IntelliSense for an path in another folder for e.g. webpack plugin options.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Awaiting More FeedbackThis means we'd like to hear from more people who would be helped by this featureSuggestionAn idea for TypeScript

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions