Skip to content

Commit

Permalink
Fix ts
Browse files Browse the repository at this point in the history
  • Loading branch information
sawyerh committed Aug 6, 2023
1 parent 5962476 commit 23ff370
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
2 changes: 2 additions & 0 deletions aws/email-importer/src/importMail/importHighlights.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ import {
import _ from "lodash";
import hash from "string-hash";

import { ParsedHighlight, ParsedHighlightWithHash } from "../types";

async function batchCreateAll(
highlights: ParsedHighlightWithHash[],
volume: DocumentReference,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
import type { GetObjectCommandOutput } from "@aws-sdk/client-s3";

interface ParsedHighlight {
export interface ParsedHighlight {
content: string;
[key: string]: unknown;
}

interface ParsedHighlightWithHash extends ParsedHighlight {
export interface ParsedHighlightWithHash extends ParsedHighlight {
hash: number;
}

interface ParsedVolume {
export interface ParsedVolume {
authors: string[];
title: string;
}

type Importer = (mail: GetObjectCommandOutput["Body"]) => Promise<{
export type Importer = (mail: GetObjectCommandOutput["Body"]) => Promise<{
highlights: ParsedHighlight[];
volume: ParsedVolume;
}>;

0 comments on commit 23ff370

Please sign in to comment.