Skip to content

Why Promise? #80

@vforchi

Description

@vforchi

Hi, I just installed this library and I wonder why all the methods of Star return Promise.
It all comes from

    public async getGeocentricEquatorialSphericalJ2000Coordinates(): Promise<EquatorialSphericalCoordinates> {
        return Promise.resolve(this.equatorialCoords);
    }

But why is this returning a Promise, since it does not do any IO or blocking operation? It seems like an unnecessary complication of the API.

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