Skip to content
This repository was archived by the owner on Apr 8, 2020. It is now read-only.
This repository was archived by the owner on Apr 8, 2020. It is now read-only.

[domain-task] addTask: return promise #1249

@stephtr

Description

@stephtr

Wouldn't it be more useful if addTask would return the original promise?
One could then write const response = await addTask(fetch('/api/test')); instead of

const task = fetch('/api/test');
addTask(task);
const response = await task;

Edit: @DanHarman also mentioned it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions