rescript-lang / rescript-lang/rescript-vscode
Make the type hint more completely.
Nessuno ha ancora preso questa issue.
- Lingua principale
- ReScript
- Stelle
- 354
- Fork
- 63
- Merge medio
- 11h 29m
- PR unite (30g)
- 1
Descrizione
Currently, our editor only support a part of type hints for type, see the code below:
module Matrix2D = {
type t = {
row: int,
col: int,
data: Js.TypedArray2.Float32Array.t,
}
let make = (~row: int, ~col: int, ~data: Js.TypedArray2.Float32Array.t): t => {
assert false
}
let zeros = (~row: int, ~col: int): t => {
assert false
}
}
module Matrix2Ds = {
type t = Matrix2D.t
let divide = (m1: t, m2: t): t => {
assert false
}
}
let m = Matrix2D.zeros(~row=3, ~col=3)
I create two modules, Matrix2D and Matrix2Ds, and a value with type Matrix2D.t. When i typing 'm->', i get some type hints of this:
As the image shows, the type hint only contains the functions of module Matrix2D, while, the function divide in module Matrix2Ds can also accept parameter with type Matrix2D.t. It's definitily a much better UE if our editor could support more completely type hints with searching among all functions by the first parameter type, just like the oop function call in Moonbit lang. @bobzhang
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Direzione di ricerca
Non sono indicati file sorgente, test o punti di ingresso. Inizia riproducendo l’esempio di Matrix2D e Matrix2Ds nell’editor e tracciando come vengono raccolti gli hint di tipo per m-e. Il lavoro è completato quando i suggerimenti trovano anche le funzioni il cui primo parametro ha il tipo del valore, inclusa Matrix2Ds.divide, con una copertura per questo esempio.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- vscode
- Ambito
- developer-experience, tooling
- Tipo di issue
- Funzionalità
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Stato di attività
- Ferma
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 25/100