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

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.

Activity

  1. changed the title [-][domain-task] addTask: return task[/-] [+][domain-task] addTask: return promise[/+] on Sep 2, 2017
  2. SteveSandersonMS commented on Sep 5, 2017

    @SteveSandersonMS
    Member

    Thanks - I'll close this in favour of #1252.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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