Skip to content

Contextual typing of destructuring parameters is not described in the spec #2006

Closed
@osdm

Description

@osdm

Contextual typing of destructuring parameters seems to be an obvious idea, but I could not find any mention of this in 1.5 spec draft in master branch. Just wanted to know if you have plans to do it or not, so we could support it in our external tool.

interface A { field1: number; field2: number }
function f(p: (p1: A) => number)  {}
f(({field1, field2}) => {})

Metadata

Metadata

Assignees

Labels

FixedA PR has been merged for this issueSpecIssues related to the TypeScript language specification

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions