From 5e9aceb7a4664f12910d218add6c40550fd93f5e Mon Sep 17 00:00:00 2001 From: Boris Yankov Date: Wed, 7 Nov 2012 15:43:27 +0200 Subject: [PATCH] Fix some sammyjs definitions --- Definitions/sammyjs-0.7.d.ts | 24 +++++++++++++++++------- 1 file changed, 17 insertions(+), 7 deletions(-) diff --git a/Definitions/sammyjs-0.7.d.ts b/Definitions/sammyjs-0.7.d.ts index 0edae0fb1..2d1344d14 100644 --- a/Definitions/sammyjs-0.7.d.ts +++ b/Definitions/sammyjs-0.7.d.ts @@ -45,7 +45,7 @@ module Sammy { export interface Object { - constructor (obj: any); + new (obj: any); escapeHTML(s: string): string; h(s: string): string; @@ -113,7 +113,9 @@ module Sammy { } export interface DataLocationProxy { - constructor (app, run_interval_every): DataLocationProxy; + + new (app, run_interval_every): DataLocationProxy; + fullPath(location_obj): string; bind(): void; unbind(): void; @@ -122,7 +124,9 @@ module Sammy { } export interface EventContext extends Object { - constructor (app, verb, path, params, target); + + new (app, verb, path, params, target); + $element(): JQuery; engineFor(engine: any): any; eventNamespace(): string; @@ -142,7 +146,9 @@ module Sammy { } export interface FormBuilder { - constructor (name, object); + + new (name, object); + checkbox(keypath: string, value: any, ...attributes: any[]): string; close(): string; hidden(keypath: string, ...attributes: any[]): string; @@ -161,13 +167,17 @@ module Sammy { } export interface GoogleAnalytics { - constructor (app, tracker); + + new (app, tracker); + noTrack(); track(path); } export interface RenderContext extends Object { - constructor (event_context); + + new (event_context); + appendTo(selector: string): RenderContext; collect(array: any[], callback: Function, now?: bool): RenderContext; interpolate(data: any, engine?: any, retain?: bool): RenderContext; @@ -207,7 +217,7 @@ module Sammy { stores: any; - constructor (options); + new (options); clear(key: string): any; clearAll(): void;