Skip to content

Wrong type for getMessage(...).wait #19

Open
@asjir

Description

@asjir

Google search terms

I only went through files here.

Describe the bug

getMessage(...).wait will return the same i.e. [data, sender] tuple, as does firstValueFrom(getMessage(...).stream)
but the types are annotated incorrectly

How do we reproduce?

const [_, stream, wait] = getMessage("a")
const waited = wait()
const streamed = firstValueFrom(stream)

Expected behavior

the same type

Actual behavior

the type infer to Promise and Promise<[string, chrome.runtime.MessageSender]> even though the output is the same

Screenshots

Please complete the following information:

  • Library Version: 1.2.2
  • Operating System: Mac
  • Browser: N/A (but Brave)
  • Node Version: v21.7.1

Additional context

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