Skip to content

doc outdated in Type Inference -> Contextual Type -> example #26472

@deepkolos

Description

@deepkolos

https://www.typescriptlang.org/docs/handbook/type-inference.html

mouseEvent has property button now

window.onmousedown = function(mouseEvent) {
    console.log(mouseEvent.button);  //<- Error
};

https://s1.ax1x.com/2018/08/15/PRwGuT.png

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugA bug in TypeScriptDocsThe issue relates to how you learn TypeScript

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions