-
Notifications
You must be signed in to change notification settings - Fork 12.9k
Closed
Labels
BugA bug in TypeScriptA bug in TypeScriptDomain: JSDocRelates to JSDoc parsing and type generationRelates to JSDoc parsing and type generationDomain: JavaScriptThe issue relates to JavaScript specificallyThe issue relates to JavaScript specifically
Milestone
Description
TypeScript Version: 2.9.0-dev.201xxxxx
Search Terms:
Code
/**
* @param {number} options.response
* @param {string} options.session
*
* @return {void}
*/
function handle({ response, session }) { // fails, { response, session } : { any, any }
}
/**
* @param {Object} options
* @param {number} options.response
* @param {string} options.session
*
* @return {void}
*/
function handle({ response, session }) { // Works { response, session } : { number, string }
}
Expected behavior:
- params have the right type in side the function
handle
should be of type the type({ response: string, session: number }) => void
.
Actual behavior:
In both cases, handle
has the type (number) => void
.
Playground Link:
Related Issues:
Metadata
Metadata
Assignees
Labels
BugA bug in TypeScriptA bug in TypeScriptDomain: JSDocRelates to JSDoc parsing and type generationRelates to JSDoc parsing and type generationDomain: JavaScriptThe issue relates to JavaScript specificallyThe issue relates to JavaScript specifically