add typescript file to build script
This commit is contained in:
parent
0d10046a3e
commit
e23f69fc4e
3 changed files with 65 additions and 0 deletions
|
|
@ -88,6 +88,7 @@ module.exports = function(grunt) {
|
||||||
tools: {expand: true, cwd: inputFolder + "/layout/tools/", src: "./**", dest: currentVersionArchiveFolder + "/tools/"},
|
tools: {expand: true, cwd: inputFolder + "/layout/tools/", src: "./**", dest: currentVersionArchiveFolder + "/tools/"},
|
||||||
comparisons: {expand: true, cwd: inputFolder + "/layout/comparisons/", src: "./**", dest: currentVersionArchiveFolder + "/comparisons/"},
|
comparisons: {expand: true, cwd: inputFolder + "/layout/comparisons/", src: "./**", dest: currentVersionArchiveFolder + "/comparisons/"},
|
||||||
unminified: {src: "mithril.js", dest: currentVersionArchiveFolder + "/mithril.js"},
|
unminified: {src: "mithril.js", dest: currentVersionArchiveFolder + "/mithril.js"},
|
||||||
|
typescript: {src: "mithril.d.ts", dest: currentVersionArchiveFolder + "/mithril.d.ts"},
|
||||||
publish: {expand: true, cwd: currentVersionArchiveFolder, src: "./**", dest: outputFolder},
|
publish: {expand: true, cwd: currentVersionArchiveFolder, src: "./**", dest: outputFolder},
|
||||||
archive: {expand: true, cwd: currentVersionArchiveFolder, src: "./**", dest: outputFolder + "/archive/v" + version},
|
archive: {expand: true, cwd: currentVersionArchiveFolder, src: "./**", dest: outputFolder + "/archive/v" + version},
|
||||||
cdnjs1: {src: currentVersionArchiveFolder + "/mithril.js", dest: "../cdnjs/ajax/libs/mithril/" + version + "/mithril.js"},
|
cdnjs1: {src: currentVersionArchiveFolder + "/mithril.js", dest: "../cdnjs/ajax/libs/mithril/" + version + "/mithril.js"},
|
||||||
|
|
|
||||||
64
archive/v0.1.13/mithril.d.ts
vendored
Normal file
64
archive/v0.1.13/mithril.d.ts
vendored
Normal file
|
|
@ -0,0 +1,64 @@
|
||||||
|
//Mithril type definitions for Typescript
|
||||||
|
|
||||||
|
interface MithrilStatic {
|
||||||
|
(selector: string, attributes: Object, children?: any): MithrilVirtualElement;
|
||||||
|
(selector: string, children?: any): MithrilVirtualElement;
|
||||||
|
prop(value?: any): (value?: any) => any;
|
||||||
|
withAttr(property: string, callback: (value: any) => void): (e: Event) => any;
|
||||||
|
module(rootElement: Element, module: MithrilModule): void;
|
||||||
|
trust(html: string): String
|
||||||
|
render(rootElement: Element, children?: any): void
|
||||||
|
render(rootElement: HTMLDocument, children?: any): void
|
||||||
|
redraw(): void
|
||||||
|
route(rootElement: Element, defaultRoute: string, routes: { [key: string]: MithrilModule }): void
|
||||||
|
route(rootElement: HTMLDocument, defaultRoute: string, routes: { [key: string]: MithrilModule }): void
|
||||||
|
route(path: string): void
|
||||||
|
route(): string;
|
||||||
|
route(element: Element, isInitialized: boolean): void;
|
||||||
|
request(options: MithrilXHROptions): MithrilPromise;
|
||||||
|
deferred(): MithrilDeferred;
|
||||||
|
sync(promises: MithrilPromise[]): MithrilPromise;
|
||||||
|
startComputation(): void;
|
||||||
|
endComputation(): void;
|
||||||
|
}
|
||||||
|
|
||||||
|
interface MithrilVirtualElement {
|
||||||
|
tag: string;
|
||||||
|
attrs: Object;
|
||||||
|
children: any;
|
||||||
|
}
|
||||||
|
|
||||||
|
interface MithrilModule {
|
||||||
|
controller: Function;
|
||||||
|
view: Function;
|
||||||
|
}
|
||||||
|
|
||||||
|
interface MithrilDeferred {
|
||||||
|
resolve(value?: any): void;
|
||||||
|
reject(value?: any): void;
|
||||||
|
promise: MithrilPromise;
|
||||||
|
}
|
||||||
|
|
||||||
|
interface MithrilPromise {
|
||||||
|
(value?: any): any;
|
||||||
|
then(successCallback?: (value: any) => any, errorCallback?: (value: any) => any): MithrilPromise;
|
||||||
|
}
|
||||||
|
|
||||||
|
interface MithrilXHROptions {
|
||||||
|
method: string;
|
||||||
|
url: string;
|
||||||
|
user?: string;
|
||||||
|
password?: string;
|
||||||
|
data?: any;
|
||||||
|
background?: boolean;
|
||||||
|
unwrapSuccess?(data: any): any;
|
||||||
|
unwrapError?(data: any): any;
|
||||||
|
serialize?(dataToSerialize: any): string;
|
||||||
|
deserialize?(dataToDeserialize: string): any;
|
||||||
|
extract?(xhr: XMLHttpRequest, options: MithrilXHROptions);
|
||||||
|
type?(data: Object): void;
|
||||||
|
config?(xhr: XMLHttpRequest, options: MithrilXHROptions)
|
||||||
|
}
|
||||||
|
|
||||||
|
declare var Mithril: MithrilStatic;
|
||||||
|
declare var m: MithrilStatic;
|
||||||
Binary file not shown.
Loading…
Add table
Add a link
Reference in a new issue