Refactors which in TS would generate a type annotation should generate jsdoc in JS #26306
Open
Description
opened on Aug 8, 2018
TypeScript Version: 3.1.0-dev.201xxxxx
Search Terms:
Code
// In TS
function x(): 42 {
return /*extract to inner function*/42;
}
// In JS
// @ts-check
/**
* @returns {42}
*/
function x() {
return /*extract to inner function*/42;
}
Expected behavior:
Under ts-check
, a refactoring should apply appropriate jsdocs to allow js to typecheck after a refactoring if it typechecked before it.
Playground Link:
Related Issues:
Activity