Open xushengfeng opened 1 month ago
Essentially a duplicate of #42054.
This seems to be different from other proposals. In addition to path hints, path mapping is also a functional requirement. Using generics allows you to better handle path mappings, which is particularly useful when working with resources.
π Search Terms
"path intellisense","path completion","asset path completion"
β Viability Checklist
β Suggestion
Add a tool generics so that some function parameters can enable file path type hints
some assets in
../assets
π Motivating Example
Enable custom file path completion through generics
π» Use Cases
When I used vite static resource introduction, I used a function to wrap it, but the function parameters could not achieve type hints like
import
.the function like:
Only
import
statements support path completion and cannot be customizedi make a vscode extension