Signature help shows no JSDoc for a `const` with a function type annotation
Mantenedores costumam responder em até 1 dia
Avaliação
- Dificuldade
- 3/5
- Tempo estimado
- 1-2 dias
- Facilidade para iniciantes
- 70/100
- Tipo de issue
- Bug
- Clareza
- Claramente especificada
- Status de atividade
- Ativa
- Stack de tecnologia
- typescript
- Domínio
- tooling
Direção de pesquisa
Start with the TypeScript language service code that provides signature help, then trace how it gets JSDoc for a function-typed const declaration. Compare the reported behavior for the declaration without an initializer, the declaration with an initializer, and an arrow function. Reproduce the case in the linked playground and add or update a regression test; done means signature help shows both the function and parameter documentation.
Escrita pelo modelo de indexação a partir do texto da issue.
Descrição
🔎 Search Terms
signature, parameter hints, jsdoc, const, type annotation, function type, @param
🕗 Version & Regression Information
- This changed between versions 6.0.3 and 7.0.2 (also in 7.1.0-dev.20261023.1)
⏯ Playground Link
💻 Code
/**
* Adds one to a number.
* @param value The number to add one to.
*/
declare const addOne: (value: number) => number;
addOne(1);
// ^ trigger signature help here
🙁 Actual behavior
Signature help shows addOne(value: number): number with no description and no documentation for value. Hover on addOne does show the JSDoc.
(Type ( in the playground to ensure JSDoc is shown for the parameter in TS 6)
🙂 Expected behavior
Signature help shows "Adds one to a number." and "The number to add one to." for value, like 6.0.3 does.
Additional information about the issue
The same happens with an initializer, like const addOne: (value: number) => number = otherFunction.
(const addOne = (value: number) => value + 1 works: the docs come from the arrow function)
- Linguagem predominante
- Go
- Estrelas
- 112k
- Forks
- 15.4k
- Merge médio
- 3d 1h
- PRs com merge (30d)
- 136
Preparar o ambiente
Inicia o contêiner de desenvolvimento do projeto no navegador, com a sua própria conta do GitHub.
- Sem Dockerfile nem arquivo Docker Compose
- Tem um modelo de pull request
- Ler o guia de contribuição
Primeiros passos
- Leia a issue inteira e depois o guia de contribuição do projeto.
- Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
- Faça um fork do repositório e trabalhe em uma branch.
- Abra um pull request que referencie o número da issue.
Mais de microsoft/TypeScript
-
Won't Fix
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 62/100
microsoft/TypeScript#65107 · 1 comentário ·
Mantenedores costumam responder em até 1 dia
-
Native API: formatDiagnosticsWithColorAndContext drops related information without a file locationTalvez já em andamento @timurzvural assumiu hoje. Aberta
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 75/100
microsoft/TypeScript#65087 ·
Mantenedores costumam responder em até 1 dia
-
TS7 LSP: documentHighlight returns nothing when the file path contains '@'Talvez livre de novo Um pull request para esta issue foi fechado sem ser mesclado. AbertaBug
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 78/100
microsoft/TypeScript#64758 ·
Mantenedores costumam responder em até 1 dia
-
Language server (tsc --lsp) exits with code 1 after `shutdown` and `exit`Talvez já em andamento @rajnish-verma-22172 assumiu há 13 dias. AbertaBug
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 76/100
microsoft/TypeScript#64742 · 1 comentário ·
Mantenedores costumam responder em até 1 dia
-
Class names `eval` and `arguments` are not reported as invalid strict mode bindingsTalvez já em andamento @dmety assumiu há 26 dias. AbertaBug
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 68/100
microsoft/TypeScript#64661 ·
Mantenedores costumam responder em até 1 dia
Todas as issues de microsoft/TypeScript
Issues semelhantes
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 75/100
Mantenedores costumam responder em até 1 dia
-
Dificuldade 1/5 Menos de uma hora Facilidade para iniciantes 84/100
Mantenedores costumam responder em até 1 dia
-
Schema validation is skipped when a transaction is invoked with a lowercase first letterTalvez já em andamento @RaphaelFakhri assumiu hoje. Aberta
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 77/100
-
cmd/ebitenmobile: multi-language bindings run the complete generator twiceTalvez já em andamento @kumagi assumiu hoje. Abertaos:macos performance
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 82/100
hajimehoshi/ebiten#4011 · 1 comentário ·
Mantenedores costumam responder em até 1 dia
-
agent-butler-finding chore
Dificuldade 1/5 Menos de uma hora Facilidade para iniciantes 78/100
jordansmall/spindrift#6318 ·
Mantenedores costumam responder em até 1 dia