Convert js files in `model/` to Typescript
Convert `JamiDaemon.js` to Typescript
Add `model/util.ts` containing some utility types.
Gitlab: #30
Change-Id: Ia5d120330011e89a0be28732965ae9814ab68d19
diff --git a/model/util.ts b/model/util.ts
new file mode 100644
index 0000000..630b358
--- /dev/null
+++ b/model/util.ts
@@ -0,0 +1,22 @@
+import { Session as ISession } from 'express-session';
+
+export interface PromiseExecutor<T> {
+ resolve: (value: T) => void;
+ reject: (reason?: any) => void;
+}
+
+export interface LookupResolveValue {
+ address: string;
+ name: string;
+ state: number;
+}
+
+export interface Lookup extends PromiseExecutor<LookupResolveValue> {
+ name?: string;
+ address?: string;
+}
+
+export interface Session extends ISession {
+ socketId: string;
+ conversation: any;
+}