Skip to content

fromEvent(Document) not typing correctly (still, ugh), boolean event useCapture option broken in TS #6512

Open
@benlesh

Description

@benlesh

I found this while updating another project from 5.5.* to 7.2.0. Basically, this doesn't work properly:

import { fromEvent } from 'rxjs';

declare const document: Document; // or just use document, duh

const result = fromEvent(document, 'click', true);
// Fails on two levels: 1 for `document` being invalid type, the other for `true` instead of `{ useCapture: true }`.

Metadata

Metadata

Assignees

No one assigned

    Labels

    7.xIssues and PRs for version 7.xbugConfirmed bug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions