Skip to content

FileReader.onLoad/onLoadEnd event argument has no target.result property #4163

@oriondean

Description

@oriondean

Trying to retrieve the result of a read file/blob via the event passed into the reader's onload/onloadend method results in a type error (Property 'result' does not exist on type 'EventTarget').

This is valid JavaScript, which is failing type checking because the EventTarget interface does not have a result property.

Examples:

Workaround: Retrieve the result from the reader object (FileReader.result)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Domain: lib.d.tsThe issue relates to the different libraries shipped with TypeScriptFixedA PR has been merged for this issueHelp WantedYou can do thisSuggestionAn idea for TypeScript

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions