Skip to content

error TS2339: Property 'control' does not exist on type 'HTMLLabelElement #19477

Closed
@soluml

Description

@soluml

TypeScript Version: 2.5.2

Code

const label:HTMLLabelElement = (<HTMLLabelElement>document.querySelector('label'));
const input:HTMLInputElement = (<HTMLInputElement>label.control);

Expected behavior:
Work -> https://developer.mozilla.org/en-US/docs/Web/API/HTMLLabelElement
Actual behavior:
Error TS2339

Metadata

Metadata

Assignees

Labels

BugA bug in TypeScriptDomain: lib.d.tsThe issue relates to the different libraries shipped with TypeScriptFixedA PR has been merged for this issueHelp WantedYou can do this

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions