Skip to content

Commit

Permalink
feat: add types (#26)
Browse files Browse the repository at this point in the history
  • Loading branch information
jamacku authored Dec 7, 2021
1 parent f9210e4 commit ce0e638
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions index.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import { Context } from "probot";

type StringOrNumber = number | string;
type Key =
| { [key: string]: StringOrNumber }
| StringOrNumber[]
| StringOrNumber;
type Value = Key;

declare function metadata(
context: Context,
issue?: { body: string; [key: string]: any }
): {
get(key?: Key): Promise<any>;
set(key: Key, value: Value): Promise<any>;
};

export = metadata;

0 comments on commit ce0e638

Please sign in to comment.