Skip to content

Avoid SolidFetchBuilder returning undefined? #31

@mielvds

Description

@mielvds

The fetch var in SolidFetchBuilder is allowed to be undefined:

private fetch: undefined | ((input: RequestInfo, init?: RequestInit | undefined) => Promise<Response>);

This is difficult to work with in typescript, since you need to include checks. However, authenticateToken(options); and authenticateInteractive(options) return a SessionInfo, which does not allow fetch to be undefined.

I was wondering whether

  • the methods buildFromClientCredentialsToken and buildInteractive cannot simply return the SessionInfo object and/or
  • default to nodefetch when undefined

On a more general note: what's the added-value of the SolidFetchBuilder class to these methods?

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