From 4fd627247d88bc4ca0baba56dc747b1394674882 Mon Sep 17 00:00:00 2001 From: oising Date: Fri, 5 Jul 2013 11:46:37 -0400 Subject: [PATCH] updated sammyjs definitions for typescript 0.9.x --- sammyjs/sammyjs.d.ts | 30 +++++++++++++++++++----------- 1 file changed, 19 insertions(+), 11 deletions(-) diff --git a/sammyjs/sammyjs.d.ts b/sammyjs/sammyjs.d.ts index f8b5ae147..84b0aef8a 100644 --- a/sammyjs/sammyjs.d.ts +++ b/sammyjs/sammyjs.d.ts @@ -1,16 +1,28 @@ // Type definitions for Sammy.js // Project: http://sammyjs.org/ // Definitions by: Boris Yankov +// - Updated for TypeScript 0.9.x by: Oisin Grehan // Definitions: https://github.com/borisyankov/DefinitelyTyped - /// -module Sammy { - export function (): Sammy.Application; - export function (selector: string): Sammy.Application; - export function (handler: Function): Sammy.Application; - export function (selector: string, handler: Function): Sammy.Application; +interface SammyFunc { + (): Sammy.Application; + (selector: string): Sammy.Application; + (handler: Function): Sammy.Application; + (selector: string, handler: Function): Sammy.Application; +} + +declare function Sammy(): Sammy.Application; +declare function Sammy(selector: string): Sammy.Application; +declare function Sammy(handler: Function): Sammy.Application; +declare function Sammy(selector: string, handler: Function): Sammy.Application; + +interface JQueryStatic { + sammy: SammyFunc; +} + +declare module Sammy { export function Cache(app, options); export function DataCacheProxy(initial, $element); @@ -201,8 +213,7 @@ module Sammy { trigger(name, data); wait(): void; } - - + export interface StoreOptions { name?: string; element?: string; @@ -241,7 +252,4 @@ module Sammy { isAvailable(type); Template(app, method_alias); } -} -interface JQueryStatic { - sammy: Sammy; } \ No newline at end of file