Skip to content

Return void instead of null #7

@kkosmowski

Description

@kkosmowski

Hey, I just installed this library.

First thing I noticed, I get type mismatch when I create a handler like this:

const handleStartCapture = () => {};

Turns out the interface for ScreenCapture props is this?:

interface Props {
    onStartCapture: () => null;
    onEndCapture: (url: string) => null;
}

I suggest changing return type of null to void, otherwise we are forced to return a value even if we don't want to.

Additionally, the example in Readme and in npm page does not present onStartCapture as required attribute, so it would be nice to update the example.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions