Package of overFlow has been changed.

This commit is contained in:
crusader
2017-07-03 19:21:42 +09:00
parent 63b55c02ad
commit 87365ba7c8
370 changed files with 195 additions and 113 deletions

View File

@@ -0,0 +1,13 @@
class Client {
private wss: WebSocket;
}
export interface Protocol {
serviceName: string;
methodName: string;
params?: string[];
}
export default Client;

View File

@@ -0,0 +1,15 @@
abstract class Service {
private name: string;
protected constructor(name: string) {
this.name = name;
}
protected send(methodName: string, ...params: any[]): Promise<string> {
return new Promise<string>(resolve => {
resolve('');
});
}
}
export default Service;

View File

@@ -0,0 +1,17 @@
class AppContext {
private static context: AppContext;
private constructor() {
}
public static getService<T>(): T {
return null;
}
public static getContext(): AppContext {
return AppContext.context;
}
}
export default AppContext;

View File

@@ -0,0 +1,14 @@
abstract class Platform {
public static * getAppContainer(containerId: string): IterableIterator<Promise<HTMLElement>> {
const appContainer = yield new Promise<HTMLElement>(resolve => {
document.addEventListener('DOMContentLoaded', () => {
resolve(document.getElementById(containerId));
});
});
return appContainer;
}
}
export default Platform;

View File

@@ -0,0 +1,8 @@
import * as Redux from 'redux';
interface Action<Payload = {}> extends Redux.Action {
payload?: Payload;
error?: Error;
}
export default Action;