From 04dda52ed1c8f49c789da0faa2c9ff227dd7e145 Mon Sep 17 00:00:00 2001 From: Valentin Popov Date: Thu, 20 Feb 2020 12:14:44 +0400 Subject: Class "Method" structure Signed-off-by: Valentin Popov --- dist/method.d.ts | 16 ++++++++++++++++ dist/types/index.d.ts | 2 ++ 2 files changed, 18 insertions(+) create mode 100644 dist/method.d.ts create mode 100644 dist/types/index.d.ts (limited to 'dist') diff --git a/dist/method.d.ts b/dist/method.d.ts new file mode 100644 index 0000000..61c31d6 --- /dev/null +++ b/dist/method.d.ts @@ -0,0 +1,16 @@ +import { Description } from "./types"; +import { Message } from "./message"; + +export declare class Method { + public constructor(methodName: string, description: Description); + + public readonly description: Description; + + public readonly name: string; + + public on(event: "request", listener: (message: Message) => void): this; + + public on(event: "cancel", listener: (message: Message) => void): this; + + public on(event: string, listener: Function): this; +} diff --git a/dist/types/index.d.ts b/dist/types/index.d.ts new file mode 100644 index 0000000..92aada8 --- /dev/null +++ b/dist/types/index.d.ts @@ -0,0 +1,2 @@ +// eslint-disable-next-line @typescript-eslint/no-type-alias +export type Description = any; -- cgit v1.2.3