Skip to content

Add argument types to URL.createObjectURL #40602

@olyop

Description

@olyop

The function URL.createObjectURL currently has an argument of type any. However, this is not in line with the types it would like to be parsed.

I suggest changing the argument from type object: any to object: File | Blob | MediaSource.

This would make make the type more helpful and make it inline with the MDN docs.

I might be missing a type of null or undefined on the union type but I'm not sure if there is a use case for this.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Domain: lib.d.tsThe issue relates to the different libraries shipped with TypeScriptExperience EnhancementNoncontroversial enhancementsSuggestionAn idea for TypeScript

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions