Skip to content

Typescript definitions #47

@janpieterz

Description

@janpieterz

I have created Typescript definitions, and wanted to check if you wanted to include this in the package or if I should simply add them to DefinitelyTyped.

declare module "react-native-app-auth" {
  interface IAppAuthProperties {
    scopes: string[];
    issuer: string;
    clientId: string;
    redirectUrl: string;
    aditionalParameters?: object;
  }

  function authorize(
    properties: IAppAuthProperties
  ): Promise<{
    accessToken: string;
    accessTokenExpirationDate: string;
    additionalParameters: object;
    idToken: string;
    refreshToken: string;
    tokenType: string;
  }>;

  function refresh(
    properties: IAppAuthProperties,
    { refreshToken: string }
  ): Promise<AuthorizeResult>;

  function revoke(
    properties: IAppAuthProperties,
    { tokenToRevoke: string, sendClientId: boolean }
  ): Promise<void>;
}

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