Skip to content
This repository was archived by the owner on Aug 24, 2021. It is now read-only.
This repository was archived by the owner on Aug 24, 2021. It is now read-only.

Typings show tag as optional but check has a guard against null tags #71

@jhendershott

Description

@jhendershott

When running eyes via typescript you're able to call the method

eyes.checkWindow() and this is valid because tag and matchTimeout are both optional
checkWindow(tag?: string, matchTimeout?: number): Promise;

However when you run you throw a very curious error that "Name" isn't set.

This appears to be due to the guard in Eyes.js
ArgumentGuard.notNullOrEmpty(name, "Name");

Which means that this isn't actually an optional parameter in practice.

Options are to remove ? from tag
jhendershott#1

or remove the guard.

also. it seems like having tag and name separate is very confusing especially if the guard is against 'NAME' and that should likely be updated through out the library

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions