From 969ce67b5f6471aeb97f0c462fcb7cfe1c6aba2f Mon Sep 17 00:00:00 2001 From: DEPIDSVY Date: Mon, 16 Nov 2015 14:33:13 +0100 Subject: [PATCH 1/7] UPDATE for latest TypeScript (Object, boolean) --- Ajax.d.ts | 12 ++++++------ Prototype.d.ts | 24 ++++++++++++++---------- test.ts | 11 ++++++++++- 3 files changed, 30 insertions(+), 17 deletions(-) diff --git a/Ajax.d.ts b/Ajax.d.ts index f4dfa78..f740e00 100644 --- a/Ajax.d.ts +++ b/Ajax.d.ts @@ -7,13 +7,13 @@ interface AjaxPeriodicalUpdater { interface AjaxRequest { getHeader(name: string): string; - success(): bool; + success(): boolean; } interface AjaxResponders { - register(responder: object): void; + register(responder: Object): void; - unregister(responder: object): void; + unregister(responder: Object): void; } interface AjaxResponse { @@ -25,13 +25,13 @@ interface AjaxResponse { getResponseHeader(name: string): string; - headerJSON: object; + headerJSON: Object; readyState: number; request: AjaxRequest; - responseJSON: object; + responseJSON: Object; responseText: string; @@ -64,4 +64,4 @@ interface Ajax { activeRequestCount: number; -} \ No newline at end of file +} diff --git a/Prototype.d.ts b/Prototype.d.ts index 452a6c8..c5b64e6 100644 --- a/Prototype.d.ts +++ b/Prototype.d.ts @@ -1,18 +1,18 @@ /// interface PrototypeBrowser { - Gecko: bool; - IE: bool; - MobileSafari: bool; - Opera: bool; - WebKit: bool; + Gecko: boolean; + IE: boolean; + MobileSafari: boolean; + Opera: boolean; + WebKit: boolean; } interface PrototypeBrowserFeatures { - ElementExtensions: bool; - SelectorsAPI: bool; - SpecificElementExtensions: bool; - XPath: bool; + ElementExtensions: boolean; + SelectorsAPI: boolean; + SpecificElementExtensions: boolean; + XPath: boolean; } interface PrototypeSelector { @@ -22,7 +22,7 @@ interface PrototypeSelector { find(elements: Element[], expresion, index): Element; - match(element, expresion): bool; + match(element, expresion): boolean; select(expresion, root): Element[]; } @@ -41,3 +41,7 @@ interface Prototype { } declare var Prototype: Prototype; + +declare class Form { + serialize(div: PrototypeSelector): string; +} diff --git a/test.ts b/test.ts index a35f2fc..9e693d7 100644 --- a/test.ts +++ b/test.ts @@ -1,5 +1,6 @@ /// +import {Ajax} from "./Ajax"; function test () { if(Prototype.Browser.IE) { alert("IE"); @@ -14,4 +15,12 @@ function test () { } else { alert("I cannot detect what kind of browser you are using"); } -} \ No newline at end of file +} + +class TestJDTS { + + ajax() { + Ajax.Updater('me'); + } + +} From d38ca23ed56de312a10efc3dcc2db82a339fca7a Mon Sep 17 00:00:00 2001 From: Slawa Pidgorny Date: Thu, 19 Jan 2017 10:55:33 +0100 Subject: [PATCH 2/7] Create composer.json --- composer.json | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 composer.json diff --git a/composer.json b/composer.json new file mode 100644 index 0000000..77b2666 --- /dev/null +++ b/composer.json @@ -0,0 +1,4 @@ +{ + "name": "spidgorny/TSProtoJSInterface", + "description": "Typescript definition for PrototypeJS. Updated." +} From 933b462617222d52f5a52310e64194c511b1f471 Mon Sep 17 00:00:00 2001 From: Slawa Pidgorny Date: Thu, 19 Jan 2017 10:56:13 +0100 Subject: [PATCH 3/7] Update composer.json --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 77b2666..ab89b70 100644 --- a/composer.json +++ b/composer.json @@ -1,4 +1,4 @@ { - "name": "spidgorny/TSProtoJSInterface", + "name": "spidgorny/ts-prototype-js-interface", "description": "Typescript definition for PrototypeJS. Updated." } From cd5f6dd5465f3104daad6e82f9e515e5c2f596b1 Mon Sep 17 00:00:00 2001 From: Slawa Pidgorny Date: Thu, 19 Jan 2017 10:58:05 +0100 Subject: [PATCH 4/7] Update composer.json --- composer.json | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/composer.json b/composer.json index ab89b70..b845816 100644 --- a/composer.json +++ b/composer.json @@ -1,4 +1,7 @@ { "name": "spidgorny/ts-prototype-js-interface", - "description": "Typescript definition for PrototypeJS. Updated." + "description": "Typescript definition for PrototypeJS. Updated.", + "replace": [ + "dapuck/TSProtoJSInterface" + ] } From af3ba55c3ee48489ea2fa73fd6734f69ab7e0924 Mon Sep 17 00:00:00 2001 From: Slawa Pidgorny Date: Tue, 7 May 2019 10:28:09 +0200 Subject: [PATCH 5/7] fix bool to boolean --- Enumerable.d.ts | 14 +++++++------- Prototype.d.ts | 2 ++ 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/Enumerable.d.ts b/Enumerable.d.ts index dc32fe9..0bc353b 100644 --- a/Enumerable.d.ts +++ b/Enumerable.d.ts @@ -1,32 +1,32 @@ interface Enumerable { - all(iterator, context): bool; - any(iterator, context): bool; + all(iterator, context): boolean; + any(iterator, context): boolean; collect(iterator, context): any[]; detect(iterator, context): Element; each(iterator, context): Enumerable; eachSlice(number, iterator, context): Enumerable; entries(): any[]; - every(iterator, context): bool; + every(iterator, context): boolean; filter(iterator, context): any[]; find(iterator, context): Element; findAll(iterator, context): any[]; grep(filter, iterator, context): any[]; - include(object): bool; + include(object): boolean; inGroupsOf(number, fillWith): any[]; inject(memo, iterator, context): any[]; inspect(): string; invoke(method): any[]; map(iterator, context): any[]; max(iterator, context): any; - member(object): bool; + member(object): boolean; min(iterator, context): any; partition(iterator, context): any[]; pluck(property): any[]; reject(iterator, context): any[]; select(iterator, context): any[]; size(): number; - some(iterator, context): bool; + some(iterator, context): boolean; sortBy(iterator, context): any[]; toArray(): any[]; zip(args: any[]): any[]; -} \ No newline at end of file +} diff --git a/Prototype.d.ts b/Prototype.d.ts index c5b64e6..2671798 100644 --- a/Prototype.d.ts +++ b/Prototype.d.ts @@ -45,3 +45,5 @@ declare var Prototype: Prototype; declare class Form { serialize(div: PrototypeSelector): string; } + +declare function $$(selector: string): HTMLElement; From 0806210cfa92e2bf077df259de3d9e63c941366f Mon Sep 17 00:00:00 2001 From: DEPIDSVY Date: Wed, 17 Feb 2021 14:08:15 +0100 Subject: [PATCH 6/7] 24492 returns array --- Prototype.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Prototype.d.ts b/Prototype.d.ts index 2671798..0bfc7f1 100644 --- a/Prototype.d.ts +++ b/Prototype.d.ts @@ -46,4 +46,4 @@ declare class Form { serialize(div: PrototypeSelector): string; } -declare function $$(selector: string): HTMLElement; +declare function $$(selector: string): HTMLElement[]; From 193ef826bdcd43a3a80514b9a960fea5fe7fbd67 Mon Sep 17 00:00:00 2001 From: Slawa Pidgorny Date: Mon, 19 Feb 2024 15:26:44 +0100 Subject: [PATCH 7/7] Create package.json --- package.json | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 package.json diff --git a/package.json b/package.json new file mode 100644 index 0000000..2847b1c --- /dev/null +++ b/package.json @@ -0,0 +1,4 @@ +{ + "name": "TSProtoJSInterface", + "version": "1.0.0" +}