no longer using custom mithril d.ts

pull/3876/head
Niklas Fiekas 2017-12-06 01:56:38 +01:00
parent 3aded8842d
commit c0ebabd57e
3 changed files with 1 additions and 64 deletions

View File

@ -49,7 +49,6 @@
"ui/tree",
"ui/@types/defer-promise",
"ui/@types/lichess",
"ui/@types/lichess-jquery",
"ui/@types/mithril"
"ui/@types/lichess-jquery"
]
}

View File

@ -1,56 +0,0 @@
declare namespace Mithril {
interface Property<T> {
(): T;
(v: T): void;
}
type Renderable = Array<VirtualElement | string | null | undefined> |
VirtualElement | string | null | undefined;
interface Static {
(tag: string): VirtualElement;
(tag: string, attrs: Attributes): VirtualElement;
(tag: string, attrs: Attributes, ...children: Renderable[]): VirtualElement;
(tag: string, ...children: Renderable[]): VirtualElement;
prop<T>(d: T): Property<T>;
module<T>(el: Element, module: Module<T>): void;
startComputation(): void;
endComputation(): void;
redraw: Redraw;
}
type Config = (el: Element, isUpdate: boolean, ctx: any, vdom: VirtualElement) => void;
interface Attributes {
class?: string;
className?: string;
config?: Config;
key?: string | number;
[property: string]: any;
}
interface Module<T> {
controller(): T;
view(ctrl: T): Renderable;
}
type RedrawStrategy = 'all' | 'diff' | 'none';
interface Redraw {
(forceSync?: boolean): void;
strategy(strategy: RedrawStrategy): void;
}
interface VirtualElement {
}
}
declare module "mithril" {
const m: Mithril.Static;
export = m;
}

View File

@ -1,6 +0,0 @@
{
"name": "@types/mithril",
"version": "1.0.0",
"author": "Thibault Duplessis",
"license": "AGPL-3.0"
}