From 26d671ccbdadcad6297bc8c0a8afe16c9f732aaf Mon Sep 17 00:00:00 2001 From: Neil Stalker Date: Fri, 28 Jun 2013 22:14:33 +0100 Subject: [PATCH] Fix definitions for TS 0.9 --- breeze/breeze-1.0.d.ts | 2 +- jquerymobile/jquerymobile.d.ts | 3 -- jsoneditoronline/jsoneditoronline.d.ts | 12 +++---- kolite/kolite.d.ts | 4 +-- node/node-0.8.8.d.ts | 43 +++++++++++--------------- nodemailer/nodemailer.d.ts | 4 +-- pouchDB/pouch.d.ts | 2 +- preloadjs/preloadjs.d.ts | 2 +- pubsubjs/pubsub.d.ts | 2 +- routie/routie.d.ts | 2 +- swipeview/swipeview.d.ts | 2 +- tween.js/tween.js.d.ts | 4 +-- 12 files changed, 36 insertions(+), 46 deletions(-) diff --git a/breeze/breeze-1.0.d.ts b/breeze/breeze-1.0.d.ts index 8a6458498..5669e85f1 100644 --- a/breeze/breeze-1.0.d.ts +++ b/breeze/breeze-1.0.d.ts @@ -183,7 +183,7 @@ declare module Breeze { parseDateFromServer(date: any): Date; } - declare var DataType: DataType; + var DataType: DataType; class EntityActionSymbol extends BreezeCore.EnumSymbol { } diff --git a/jquerymobile/jquerymobile.d.ts b/jquerymobile/jquerymobile.d.ts index 2d6fa744a..84c27ba41 100644 --- a/jquerymobile/jquerymobile.d.ts +++ b/jquerymobile/jquerymobile.d.ts @@ -291,11 +291,8 @@ interface JQueryMobile extends JQueryMobileOptions { showPageLoadingMsg(); hidePageLoadingMsg(); loader; - loading; - loadPage; page; - silentScroll; touchOverflow; showCategory; path; diff --git a/jsoneditoronline/jsoneditoronline.d.ts b/jsoneditoronline/jsoneditoronline.d.ts index 7bdacf0ac..4b46f4ec0 100644 --- a/jsoneditoronline/jsoneditoronline.d.ts +++ b/jsoneditoronline/jsoneditoronline.d.ts @@ -12,7 +12,7 @@ interface JSONEditorOptions { search?: bool; } -class JSONEditorHistory { +declare class JSONEditorHistory { constructor(editor: JSONEditor); onChange(): void; add(action: string, params: Object); @@ -40,7 +40,7 @@ interface JSONEditorConstructorParams { value?: any; } -class JSONEditorNode { +declare class JSONEditorNode { constructor(editor: JSONEditor, params: JSONEditorConstructorParams); setParent(parent: JSONEditorNode): void; getParent(): JSONEditorNode; @@ -77,7 +77,7 @@ class JSONEditorNode { getAppend(): HTMLElement; } -class JSONEditorAppendNode extends JSONEditorNode { +declare class JSONEditorAppendNode extends JSONEditorNode { constructor(editor: JSONEditor); } @@ -92,7 +92,7 @@ interface JSONEditorShowDropDownListParams { callback: (value: any) => void; } -class JSONEditorSearchBox { +declare class JSONEditorSearchBox { constructor(editor: JSONEditor, container: HTMLElement); next(): void; previous(): void; @@ -126,7 +126,7 @@ interface JSONEditorActionParams { newType?: JSONEditorNodeType; } -class JSONEditor { +declare class JSONEditor { constructor(container: HTMLElement, options?: JSONEditorOptions, json?: any); set(json: Object, name?: string): void; setName(name?: string): void; @@ -170,7 +170,7 @@ interface JSONFormatterOptions { indentation?: number; } -class JSONFormatter { +declare class JSONFormatter { constructor(container: HTMLElement, options?: JSONFormatterOptions, json?: any); set(json: Object); get(): Object; diff --git a/kolite/kolite.d.ts b/kolite/kolite.d.ts index c6c5ec35e..d86573116 100644 --- a/kolite/kolite.d.ts +++ b/kolite/kolite.d.ts @@ -41,7 +41,7 @@ interface JQuery { // DirtyFlag ///////////////////////////////////////////// interface DirtyFlag { - isDirty: KnockoutComputed; + isDirty: KnockoutComputed; new (objectToTrack: any, isInitiallyDirty?: bool, hashFunction?: () => any); reset(): void; } @@ -54,7 +54,7 @@ interface KnockoutStatic { // Command ///////////////////////////////////////////// interface KoliteCommand { - canExecute: KnockoutComputed; + canExecute: KnockoutComputed; execute(...args: any[]): any; } diff --git a/node/node-0.8.8.d.ts b/node/node-0.8.8.d.ts index 152b8a9f8..968d2143f 100644 --- a/node/node-0.8.8.d.ts +++ b/node/node-0.8.8.d.ts @@ -12,17 +12,6 @@ declare var process: NodeProcess; declare var global: any; -declare var console: { - log(...data: any[]): void; - info(...data: any[]): void; - error(...data: any[]): void; - warn(...data: any[]): void; - dir(obj: any): void; - timeEnd(label: string): void; - trace(label: string): void; - assert(expression: any, ...message: string[]): void; -} - declare var __filename: string; declare var __dirname: string; @@ -309,7 +298,7 @@ declare module "cluster" { } export interface Worker { id: string; - process: child_process; + process: child_process.ChildProcess; suicide: bool; send(message: any, sendHandle?: any): void; destroy(): void; @@ -1015,19 +1004,23 @@ declare module "util" { } declare module "assert" { - export function (booleanValue: bool, message?: string); - export function fail(actual: any, expected: any, message: string, operator: string): void; - export function assert(value: any, message: string): void; - export function ok(value: any, message?: string): void; - export function equal(actual: any, expected: any, message?: string): void; - export function notEqual(actual: any, expected: any, message?: string): void; - export function deepEqual(actual: any, expected: any, message?: string): void; - export function notDeepEqual(acutal: any, expected: any, message?: string): void; - export function strictEqual(actual: any, expected: any, message?: string): void; - export function notStrictEqual(actual: any, expected: any, message?: string): void; - export function throws(block: any, error?: any, messsage?: string): void; - export function doesNotThrow(block: any, error?: any, messsage?: string): void; - export function ifError(value: any): void; + function internal(booleanValue: boolean, message?: string): void; + module internal { + export function fail(actual: any, expected: any, message: string, operator: string): void; + export function assert(value: any, message: string): void; + export function ok(value: any, message?: string): void; + export function equal(actual: any, expected: any, message?: string): void; + export function notEqual(actual: any, expected: any, message?: string): void; + export function deepEqual(actual: any, expected: any, message?: string): void; + export function notDeepEqual(acutal: any, expected: any, message?: string): void; + export function strictEqual(actual: any, expected: any, message?: string): void; + export function notStrictEqual(actual: any, expected: any, message?: string): void; + export function throws(block: any, error?: any, messsage?: string): void; + export function doesNotThrow(block: any, error?: any, messsage?: string): void; + export function ifError(value: any): void; + } + + export = internal; } declare module "tty" { diff --git a/nodemailer/nodemailer.d.ts b/nodemailer/nodemailer.d.ts index 681dd089b..7d62b7fa5 100644 --- a/nodemailer/nodemailer.d.ts +++ b/nodemailer/nodemailer.d.ts @@ -4,7 +4,7 @@ // Definitions by: Vincent Bortone // Definitions: https://github.com/borisyankov/DefinitelyTyped -class Transport { +declare class Transport { static transports: { SMTP: Transport; SES: Transport; @@ -47,7 +47,7 @@ interface DKIMOptions{ privateKey: any; } -class XOAuthGenerator { +declare class XOAuthGenerator { constructor(options: XOAuthGeneratorOptions); generate(callback: () => any): string; } diff --git a/pouchDB/pouch.d.ts b/pouchDB/pouch.d.ts index 0fa6a1eb2..44730ca4d 100644 --- a/pouchDB/pouch.d.ts +++ b/pouchDB/pouch.d.ts @@ -215,7 +215,7 @@ interface Pouch extends PouchApi { destroy(name: string, callback: (err: PouchError) => void): void; } -var Pouch: Pouch; +declare var Pouch: Pouch; // // emit is the function that the PouchFilter.map function should call in order to add a particular item to // a filter view. diff --git a/preloadjs/preloadjs.d.ts b/preloadjs/preloadjs.d.ts index 16d939e20..1b882f9cf 100644 --- a/preloadjs/preloadjs.d.ts +++ b/preloadjs/preloadjs.d.ts @@ -10,7 +10,7 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -module createjs { +declare module createjs { export class AbstractLoader { // properties canceled: bool; diff --git a/pubsubjs/pubsub.d.ts b/pubsubjs/pubsub.d.ts index f7bbbbf87..ae5b960f9 100644 --- a/pubsubjs/pubsub.d.ts +++ b/pubsubjs/pubsub.d.ts @@ -1,6 +1,6 @@ // Type definitions for PubSubJS 1.3.5 -module PubSubJS { +declare module PubSubJS { interface Base extends Publish, Subscribe, Unsubscribe { version: string; name: string; diff --git a/routie/routie.d.ts b/routie/routie.d.ts index 78f7e2808..641c37887 100644 --- a/routie/routie.d.ts +++ b/routie/routie.d.ts @@ -12,4 +12,4 @@ interface Route { toURL(params: any): string; } -function routie(path: string, fn: Function): void; \ No newline at end of file +declare function routie(path: string, fn: Function): void; \ No newline at end of file diff --git a/swipeview/swipeview.d.ts b/swipeview/swipeview.d.ts index f9be1cb2d..dd77b7c61 100644 --- a/swipeview/swipeview.d.ts +++ b/swipeview/swipeview.d.ts @@ -20,7 +20,7 @@ interface PageHTMLElement extends HTMLElement { dataset: any; } -class SwipeView { +declare class SwipeView { masterPages: PageHTMLElement[]; currentMasterPage: number; diff --git a/tween.js/tween.js.d.ts b/tween.js/tween.js.d.ts index 348adf3c1..77aab0729 100644 --- a/tween.js/tween.js.d.ts +++ b/tween.js/tween.js.d.ts @@ -3,7 +3,7 @@ // Definitions by: https://github.com/sunetos // Definitions: https://github.com/borisyankov/DefinitelyTyped -module TWEEN { +declare module TWEEN { export var REVISION: string; export function getAll(): Tween[]; export function removeAll(): void; @@ -24,7 +24,7 @@ module TWEEN { onUpdate(callback:Function): Tween; onComplete(callback:Function): Tween; update(time:number): bool; - }; + } export var Easing: TweenEasing; export var Interpolation: TweenInterpolation; }