From 5b5a144f56ee5360fdfd70b79bca3616c587645c Mon Sep 17 00:00:00 2001 From: Jan Macku Date: Tue, 7 Dec 2021 14:08:02 +0100 Subject: [PATCH] d.ts: Add declaration file --- index.d.ts | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 index.d.ts diff --git a/index.d.ts b/index.d.ts new file mode 100644 index 0000000..8ada62c --- /dev/null +++ b/index.d.ts @@ -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; + set(key: Key, value: Value): Promise; +}; + +export = metadata;