aboutsummaryrefslogtreecommitdiff
path: root/dist
diff options
context:
space:
mode:
authorValentin Popov <info@valentineus.link>2020-02-20 11:14:44 +0300
committerValentin Popov <info@valentineus.link>2020-02-20 11:14:44 +0300
commit04dda52ed1c8f49c789da0faa2c9ff227dd7e145 (patch)
treea78bb207c53203acd5b9cdbc09d8840f479fabcf /dist
parentb7bdbd77e7411a6340f18c96a5d781bf8186b81f (diff)
downloadwebos-service-types-04dda52ed1c8f49c789da0faa2c9ff227dd7e145.tar.xz
webos-service-types-04dda52ed1c8f49c789da0faa2c9ff227dd7e145.zip
Class "Method" structure
Signed-off-by: Valentin Popov <info@valentineus.link>
Diffstat (limited to 'dist')
-rw-r--r--dist/method.d.ts16
-rw-r--r--dist/types/index.d.ts2
2 files changed, 18 insertions, 0 deletions
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;