Skip to content

Update types definitions #365

@Elazul

Description

@Elazul

Hi! Types definitions of this lib are outdated: https://github.com/DefinitelyTyped/DefinitelyTyped/tree/b6689380c5719ec5ad1ea15108fea661d7f300ca/types/apollo-upload-client . Would it be possible to update them please ?

For now I had to define my own type as a workaround :

declare module "apollo-upload-client/UploadHttpLink.mjs" {
  import { ApolloLink } from "@apollo/client/link";

  export default class UploadHttpLink extends ApolloLink {
    constructor(options?: {
      uri?: string;
      fetch?: typeof fetch;
      fetchOptions?: Record<string, any>;
      includeExtensions?: boolean;
      useGETForQueries?: boolean;
      isExtractableFile?: (value: any) => boolean;
      formDataAppendFile?: (
        formData: FormData,
        fieldName: string,
        file: File
      ) => void;
      formDataFactory?: () => FormData;
    });
  }
}

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