index.ts 508 B

123456789101112131415161718
  1. import * as TE from "fp-ts/TaskEither"
  2. import { HoppRESTRequest, HoppCollection } from "@hoppscotch/data"
  3. export type HoppExporter<T> = (content: T) => TE.TaskEither<string, string>
  4. export type HoppExporterDefinition<T> = {
  5. name: string
  6. exporter: () => Promise<HoppExporter<T>>
  7. }
  8. export const RESTCollectionExporters: HoppExporterDefinition<
  9. HoppCollection<HoppRESTRequest>
  10. >[] = [
  11. {
  12. name: "Hoppscotch REST Collection JSON",
  13. exporter: () => import("./hopp").then((m) => m.default),
  14. },
  15. ]