From a943bcf95db2bed7111a5f828e86827f335c3d79 Mon Sep 17 00:00:00 2001 From: Martin McWhorter Date: Mon, 15 Dec 2014 12:19:47 +0000 Subject: [PATCH 1/4] Definitions for ngProgress Definitions for https://github.com/victorbjelkholm/ngprogress --- ngprogress/ngprogress-tests.ts | 16 ++++++++++++++++ ngprogress/ngprogress.d.ts | 19 +++++++++++++++++++ 2 files changed, 35 insertions(+) create mode 100644 ngprogress/ngprogress-tests.ts create mode 100644 ngprogress/ngprogress.d.ts diff --git a/ngprogress/ngprogress-tests.ts b/ngprogress/ngprogress-tests.ts new file mode 100644 index 0000000000..485682054d --- /dev/null +++ b/ngprogress/ngprogress-tests.ts @@ -0,0 +1,16 @@ +/// + + +var ngProgress: NgProgress.INgProgress = {}; + +ngProgress.start(); +ngProgress.height('10px'); +ngProgress.color('red'); + +var statusResult: number = undefined; +ngProgress.status(); + +ngProgress.stop(); +ngProgress.set(50); +ngProgress.reset(); +ngProgress.complete(); \ No newline at end of file diff --git a/ngprogress/ngprogress.d.ts b/ngprogress/ngprogress.d.ts new file mode 100644 index 0000000000..f34496960b --- /dev/null +++ b/ngprogress/ngprogress.d.ts @@ -0,0 +1,19 @@ +// Type definitions for ngProgress 1.0.7 +// Project: http://victorbjelkholm.github.io/ngProgress/ +// Definitions by: Martin McWhorter https://github.com/martinmcwhorter +// Definitions: https://github.com/borisyankov/DefinitelyTyped + +declare module NgProgress { + + export interface INgProgress { + start(): void; + height(height: string): void; + color(color: string): void; + status(): string; + stop(): void; + set(value: number): void; + reset(): void; + complete(): void; + } + +} \ No newline at end of file From 17d8aadb533b1c3ae462f8bcfcfa758bb38e55c1 Mon Sep 17 00:00:00 2001 From: Martin McWhorter Date: Mon, 15 Dec 2014 12:24:59 +0000 Subject: [PATCH 2/4] Revert "add INgModelController#$setPristine()" This reverts commit 22d7bbaa48074f41e8bac9ea66a9a202fcd4c8cb. --- angularjs/legacy/angular-1.2.d.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/angularjs/legacy/angular-1.2.d.ts b/angularjs/legacy/angular-1.2.d.ts index 08cc6fcbc4..fb21b030a6 100644 --- a/angularjs/legacy/angular-1.2.d.ts +++ b/angularjs/legacy/angular-1.2.d.ts @@ -285,7 +285,6 @@ declare module ng { // Documentation states viewValue and modelValue to be a string but other // types do work and it's common to use them. $setViewValue(value: any): void; - $setPristine(): void; $viewValue: any; $modelValue: any; From 1ef72fa99d4d1cc200bc15347dd8c8b9a68a0b70 Mon Sep 17 00:00:00 2001 From: Martin McWhorter Date: Mon, 15 Dec 2014 12:46:27 +0000 Subject: [PATCH 3/4] Updated url --- ngprogress/ngprogress-tests.ts | 3 ++- ngprogress/ngprogress.d.ts | 5 +++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/ngprogress/ngprogress-tests.ts b/ngprogress/ngprogress-tests.ts index 485682054d..935ea1c976 100644 --- a/ngprogress/ngprogress-tests.ts +++ b/ngprogress/ngprogress-tests.ts @@ -13,4 +13,5 @@ ngProgress.status(); ngProgress.stop(); ngProgress.set(50); ngProgress.reset(); -ngProgress.complete(); \ No newline at end of file +ngProgress.complete(); + diff --git a/ngprogress/ngprogress.d.ts b/ngprogress/ngprogress.d.ts index f34496960b..28506a379c 100644 --- a/ngprogress/ngprogress.d.ts +++ b/ngprogress/ngprogress.d.ts @@ -1,6 +1,6 @@ // Type definitions for ngProgress 1.0.7 // Project: http://victorbjelkholm.github.io/ngProgress/ -// Definitions by: Martin McWhorter https://github.com/martinmcwhorter +// Definitions by: Martin McWhorter // Definitions: https://github.com/borisyankov/DefinitelyTyped declare module NgProgress { @@ -16,4 +16,5 @@ declare module NgProgress { complete(): void; } -} \ No newline at end of file +} + From d4934072f6ed004b4043b995b40a17062abee578 Mon Sep 17 00:00:00 2001 From: Martin McWhorter Date: Tue, 16 Dec 2014 10:54:37 +0000 Subject: [PATCH 4/4] Fixed return type of #status() --- ngprogress/ngprogress-tests.ts | 5 +---- ngprogress/ngprogress.d.ts | 2 +- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/ngprogress/ngprogress-tests.ts b/ngprogress/ngprogress-tests.ts index 935ea1c976..9d52f97291 100644 --- a/ngprogress/ngprogress-tests.ts +++ b/ngprogress/ngprogress-tests.ts @@ -6,10 +6,7 @@ var ngProgress: NgProgress.INgProgress = {}; ngProgress.start(); ngProgress.height('10px'); ngProgress.color('red'); - -var statusResult: number = undefined; -ngProgress.status(); - +var statusResult: number = ngProgress.status(); ngProgress.stop(); ngProgress.set(50); ngProgress.reset(); diff --git a/ngprogress/ngprogress.d.ts b/ngprogress/ngprogress.d.ts index 28506a379c..fdcdd28cb5 100644 --- a/ngprogress/ngprogress.d.ts +++ b/ngprogress/ngprogress.d.ts @@ -9,7 +9,7 @@ declare module NgProgress { start(): void; height(height: string): void; color(color: string): void; - status(): string; + status(): number; stop(): void; set(value: number): void; reset(): void;