├── .gitignore
├── LICENSE
├── README.md
├── code-coverage1.html
├── configuration.html
├── img
├── CatalogIcon.png
├── logo.png
├── preview1.png
└── screenshots
│ ├── configuration.png
│ └── widgets.png
├── node_modules
├── @types
│ ├── jquery
│ │ ├── README.md
│ │ ├── index.d.ts
│ │ └── package.json
│ ├── jqueryui
│ │ ├── README.md
│ │ ├── index.d.ts
│ │ ├── package.json
│ │ └── types-metadata.json
│ ├── knockout
│ │ ├── README.md
│ │ ├── index.d.ts
│ │ └── package.json
│ ├── q
│ │ ├── README.md
│ │ ├── index.d.ts
│ │ ├── package.json
│ │ └── types-metadata.json
│ ├── react
│ │ ├── README.md
│ │ ├── index.d.ts
│ │ ├── package.json
│ │ └── types-metadata.json
│ └── requirejs
│ │ ├── README.md
│ │ ├── index.d.ts
│ │ └── package.json
└── vss-web-extension-sdk
│ ├── .npmignore
│ ├── LICENSE
│ ├── README.md
│ ├── bower.json
│ ├── img
│ └── dependencies.png
│ ├── lib
│ └── VSS.SDK.min.js
│ ├── package.json
│ ├── tsconfig.json
│ └── typings
│ ├── index.d.ts
│ ├── rmo.d.ts
│ ├── tfs.d.ts
│ └── vss.d.ts
├── overview.md
├── package-lock.json
├── sdk
└── scripts
│ └── VSS.SDK.min.js
└── vss-extension.json
/.gitignore:
--------------------------------------------------------------------------------
1 | #OS junk files
2 | [Tt]humbs.db
3 | *.DS_Store
4 |
5 | #Visual Studio files
6 | *.vsix
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2019 Shane Davis
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # Code Coverage Dashboard Widgets
2 | * NOTE: This works with Azure DevOps and Azure DevOps Server (Team Foundation Server). However, Microsoft requires TFS 2015 Update 3 or higher for folks using Azure DevOps Server (Team Foundation Server).
3 |
4 | ## Code Coverage Widget
5 | This widget displays the percentage of unit test code coverage based on a selected build definition. If a build definition does not have any unit tests results recognized by the widget or if has not yet been configured, it will indicate so with a message displayed within the widget.
6 |
7 | 
8 |
9 | The following configuration options are available:
10 |
11 | 
12 |
13 | ## Release Notes
14 | * 1.0.272
15 | * Added configuration option to display delta of previous build's coverage.
16 | * Updated logo and screenshots.
17 | * 1.0.219
18 | * Fixed issues where widget would not render properly.
19 | * 1.0.195
20 | * Added configuration option to display measurement name (via PR from [Tommy Vernieri](https://github.com/Blackbaud-TommyVernieri))
21 | * 1.0.194
22 | * Added support for Branches (via PR from [Tommy Vernieri](https://github.com/Blackbaud-TommyVernieri))
23 | * 1.0.191
24 | * Added support for Failed builds that produce code coverage results.
25 | * 1.0.190
26 | * Added support for Partially Succeeded builds.
27 | * 1.0.189
28 | * Updated to latest SDK.
29 | * Minor updates to improve error handling.
30 | * 1.0.171
31 | * Added configuration option to display up to two decimal places. Zero is the default.
32 | * Added broader configuration options for broader coverage measurement:
33 | * Blocks
34 | * Branch
35 | * Class
36 | * Complexity
37 | * Instruction
38 | * Line
39 | * Lines (this is the default)
40 | * Method
41 | * 1.0.166
42 | * Added configuration option to measure Lines or Blocks.
43 | * 1.0.162
44 | * Displayed build name now links to build details.
45 | * 1.0.149
46 | * Fixed defect where build was not showing as selected.
47 | * Added configuration option to display build name on widget.
48 | * Updated to match native style.
49 | * 1.0.122
50 | * Widget can now be resized to one or two columns in width.
51 | * 1.0.119
52 | * Build definitions are now sorted alphabetically.
53 | * 1.0.99
54 | * Initial release. Includes a single widget that extracts "Line" (.NET) or "Lines" (Java) code coverage results from unit tests executed during a build.
55 |
56 | ## Known Issues
57 | * Build definitions are limited to the first 1,000. This is a limitation of the Azure DevOps REST API.
58 |
59 | ## Contributing
60 | If you would like to contribute to these widgets, clone this repository and make your changes. Then submit
61 | a pull request and I'll review it as soon as possible.
62 |
63 | ## Issues
64 | If you encounter an issue while using these widgets please open an issue [here](https://github.com/sdavis3/CodeCoverageDashboardWidgets/issues).
65 |
66 | ## Roadmap
67 | I plan to expand on these widgets to support a wider variety of unit test metrics. Please submit an issue if you have a feature request.
68 |
--------------------------------------------------------------------------------
/code-coverage1.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
194 |
195 |
196 |
205 |
206 |
207 |
--------------------------------------------------------------------------------
/configuration.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
252 |
253 |
254 |
302 |
303 |
304 |
--------------------------------------------------------------------------------
/img/CatalogIcon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sdavis3/code-coverage-widgets/88455a1c82f1802b770c107c56482112e6b79da8/img/CatalogIcon.png
--------------------------------------------------------------------------------
/img/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sdavis3/code-coverage-widgets/88455a1c82f1802b770c107c56482112e6b79da8/img/logo.png
--------------------------------------------------------------------------------
/img/preview1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sdavis3/code-coverage-widgets/88455a1c82f1802b770c107c56482112e6b79da8/img/preview1.png
--------------------------------------------------------------------------------
/img/screenshots/configuration.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sdavis3/code-coverage-widgets/88455a1c82f1802b770c107c56482112e6b79da8/img/screenshots/configuration.png
--------------------------------------------------------------------------------
/img/screenshots/widgets.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sdavis3/code-coverage-widgets/88455a1c82f1802b770c107c56482112e6b79da8/img/screenshots/widgets.png
--------------------------------------------------------------------------------
/node_modules/@types/jquery/README.md:
--------------------------------------------------------------------------------
1 | # Installation
2 | > `npm install --save @types/jquery`
3 |
4 | # Summary
5 | This package contains type definitions for jQuery 1.10.x / (http://jquery.com/).
6 |
7 | # Details
8 | Files were exported from https://www.github.com/DefinitelyTyped/DefinitelyTyped/tree/master/jquery
9 |
10 | Additional Details
11 | * Last updated: Sat, 11 Mar 2017 00:13:28 GMT
12 | * Dependencies: none
13 | * Global values: $, jQuery
14 |
15 | # Credits
16 | These definitions were written by Boris Yankov , Christian Hoffmeister , Steve Fenton , Diullei Gomes , Tass Iliopoulos , Jason Swearingen , Sean Hill , Guus Goossens , Kelly Summerlin , Basarat Ali Syed , Nicholas Wolverson , Derek Cicerone , Andrew Gaspar , James Harrison Fisher , Seikichi Kondo , Benjamin Jackman , Poul Sorensen , Josh Strobl , John Reilly , Dick van den Brink , Thomas Schulz .
17 |
--------------------------------------------------------------------------------
/node_modules/@types/jquery/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "_args": [
3 | [
4 | {
5 | "raw": "@types/jquery@^2.0.34",
6 | "scope": "@types",
7 | "escapedName": "@types%2fjquery",
8 | "name": "@types/jquery",
9 | "rawSpec": "^2.0.34",
10 | "spec": ">=2.0.34 <3.0.0",
11 | "type": "range"
12 | },
13 | "/Users/shane/Dropbox/Code/CodeCoverageDashboardWidgets-Dev/node_modules/vss-web-extension-sdk"
14 | ]
15 | ],
16 | "_from": "@types/jquery@>=2.0.34 <3.0.0",
17 | "_id": "@types/jquery@2.0.41",
18 | "_inCache": true,
19 | "_location": "/@types/jquery",
20 | "_npmOperationalInternal": {
21 | "host": "packages-12-west.internal.npmjs.com",
22 | "tmp": "tmp/jquery-2.0.41.tgz_1489191289022_0.8532251426950097"
23 | },
24 | "_npmUser": {
25 | "name": "types",
26 | "email": "ts-npm-types@microsoft.com"
27 | },
28 | "_phantomChildren": {},
29 | "_requested": {
30 | "raw": "@types/jquery@^2.0.34",
31 | "scope": "@types",
32 | "escapedName": "@types%2fjquery",
33 | "name": "@types/jquery",
34 | "rawSpec": "^2.0.34",
35 | "spec": ">=2.0.34 <3.0.0",
36 | "type": "range"
37 | },
38 | "_requiredBy": [
39 | "/@types/jqueryui",
40 | "/vss-web-extension-sdk"
41 | ],
42 | "_resolved": "https://registry.npmjs.org/@types/jquery/-/jquery-2.0.41.tgz",
43 | "_shasum": "b87ba051011f99edbe586d8f97282e7786e01a6d",
44 | "_shrinkwrap": null,
45 | "_spec": "@types/jquery@^2.0.34",
46 | "_where": "/Users/shane/Dropbox/Code/CodeCoverageDashboardWidgets-Dev/node_modules/vss-web-extension-sdk",
47 | "contributors": [
48 | {
49 | "name": "Boris Yankov",
50 | "url": "https://github.com/borisyankov/"
51 | },
52 | {
53 | "name": "Christian Hoffmeister",
54 | "url": "https://github.com/choffmeister"
55 | },
56 | {
57 | "name": "Steve Fenton",
58 | "url": "https://github.com/Steve-Fenton"
59 | },
60 | {
61 | "name": "Diullei Gomes",
62 | "url": "https://github.com/Diullei"
63 | },
64 | {
65 | "name": "Tass Iliopoulos",
66 | "url": "https://github.com/tasoili"
67 | },
68 | {
69 | "name": "Jason Swearingen",
70 | "url": "https://github.com/jasons-novaleaf"
71 | },
72 | {
73 | "name": "Sean Hill",
74 | "url": "https://github.com/seanski"
75 | },
76 | {
77 | "name": "Guus Goossens",
78 | "url": "https://github.com/Guuz"
79 | },
80 | {
81 | "name": "Kelly Summerlin",
82 | "url": "https://github.com/ksummerlin"
83 | },
84 | {
85 | "name": "Basarat Ali Syed",
86 | "url": "https://github.com/basarat"
87 | },
88 | {
89 | "name": "Nicholas Wolverson",
90 | "url": "https://github.com/nwolverson"
91 | },
92 | {
93 | "name": "Derek Cicerone",
94 | "url": "https://github.com/derekcicerone"
95 | },
96 | {
97 | "name": "Andrew Gaspar",
98 | "url": "https://github.com/AndrewGaspar"
99 | },
100 | {
101 | "name": "James Harrison Fisher",
102 | "url": "https://github.com/jameshfisher"
103 | },
104 | {
105 | "name": "Seikichi Kondo",
106 | "url": "https://github.com/seikichi"
107 | },
108 | {
109 | "name": "Benjamin Jackman",
110 | "url": "https://github.com/benjaminjackman"
111 | },
112 | {
113 | "name": "Poul Sorensen",
114 | "url": "https://github.com/s093294"
115 | },
116 | {
117 | "name": "Josh Strobl",
118 | "url": "https://github.com/JoshStrobl"
119 | },
120 | {
121 | "name": "John Reilly",
122 | "url": "https://github.com/johnnyreilly/"
123 | },
124 | {
125 | "name": "Dick van den Brink",
126 | "url": "https://github.com/DickvdBrink"
127 | },
128 | {
129 | "name": "Thomas Schulz",
130 | "url": "https://github.com/King2500"
131 | }
132 | ],
133 | "dependencies": {},
134 | "description": "TypeScript definitions for jQuery 1.10.x /",
135 | "devDependencies": {},
136 | "directories": {},
137 | "dist": {
138 | "shasum": "b87ba051011f99edbe586d8f97282e7786e01a6d",
139 | "tarball": "https://registry.npmjs.org/@types/jquery/-/jquery-2.0.41.tgz"
140 | },
141 | "license": "MIT",
142 | "main": "",
143 | "maintainers": [
144 | {
145 | "name": "types",
146 | "email": "ryan.cavanaugh@microsoft.com"
147 | }
148 | ],
149 | "name": "@types/jquery",
150 | "optionalDependencies": {},
151 | "peerDependencies": {},
152 | "readme": "ERROR: No README data found!",
153 | "repository": {
154 | "type": "git",
155 | "url": "https://www.github.com/DefinitelyTyped/DefinitelyTyped.git"
156 | },
157 | "scripts": {},
158 | "typeScriptVersion": "2.0",
159 | "typesPublisherContentHash": "6ad9efa0b178519948b5e5bf354ce2070d3aa3ec01022a805ea472e36da1604b",
160 | "version": "2.0.41"
161 | }
162 |
--------------------------------------------------------------------------------
/node_modules/@types/jqueryui/README.md:
--------------------------------------------------------------------------------
1 | # Installation
2 | > `npm install --save @types/jqueryui`
3 |
4 | # Summary
5 | This package contains type definitions for jQueryUI (http://jqueryui.com/).
6 |
7 | # Details
8 | Files were exported from https://www.github.com/DefinitelyTyped/DefinitelyTyped/tree/master/jqueryui
9 |
10 | Additional Details
11 | * Last updated: Thu, 15 Dec 2016 16:51:51 GMT
12 | * Library Dependencies: jquery
13 | * Module Dependencies: none
14 | * Global values: none
15 |
16 | # Credits
17 | These definitions were written by Boris Yankov , John Reilly .
18 |
--------------------------------------------------------------------------------
/node_modules/@types/jqueryui/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "_args": [
3 | [
4 | {
5 | "raw": "@types/jqueryui@^1.11.31",
6 | "scope": "@types",
7 | "escapedName": "@types%2fjqueryui",
8 | "name": "@types/jqueryui",
9 | "rawSpec": "^1.11.31",
10 | "spec": ">=1.11.31 <2.0.0",
11 | "type": "range"
12 | },
13 | "/Users/shane/Dropbox/Code/CodeCoverageDashboardWidgets-Dev/node_modules/vss-web-extension-sdk"
14 | ]
15 | ],
16 | "_from": "@types/jqueryui@>=1.11.31 <2.0.0",
17 | "_id": "@types/jqueryui@1.11.32",
18 | "_inCache": true,
19 | "_location": "/@types/jqueryui",
20 | "_npmOperationalInternal": {
21 | "host": "packages-12-west.internal.npmjs.com",
22 | "tmp": "tmp/jqueryui-1.11.32.tgz_1481820751706_0.11502911942079663"
23 | },
24 | "_npmUser": {
25 | "name": "types",
26 | "email": "ts-npm-types@microsoft.com"
27 | },
28 | "_phantomChildren": {},
29 | "_requested": {
30 | "raw": "@types/jqueryui@^1.11.31",
31 | "scope": "@types",
32 | "escapedName": "@types%2fjqueryui",
33 | "name": "@types/jqueryui",
34 | "rawSpec": "^1.11.31",
35 | "spec": ">=1.11.31 <2.0.0",
36 | "type": "range"
37 | },
38 | "_requiredBy": [
39 | "/vss-web-extension-sdk"
40 | ],
41 | "_resolved": "https://registry.npmjs.org/@types/jqueryui/-/jqueryui-1.11.32.tgz",
42 | "_shasum": "5a21bdedd6517c21baef754889931b7d27b5fb3e",
43 | "_shrinkwrap": null,
44 | "_spec": "@types/jqueryui@^1.11.31",
45 | "_where": "/Users/shane/Dropbox/Code/CodeCoverageDashboardWidgets-Dev/node_modules/vss-web-extension-sdk",
46 | "author": {
47 | "name": "Boris Yankov",
48 | "email": "https://github.com/borisyankov/"
49 | },
50 | "dependencies": {
51 | "@types/jquery": "*"
52 | },
53 | "description": "TypeScript definitions for jQueryUI",
54 | "devDependencies": {},
55 | "directories": {},
56 | "dist": {
57 | "shasum": "5a21bdedd6517c21baef754889931b7d27b5fb3e",
58 | "tarball": "https://registry.npmjs.org/@types/jqueryui/-/jqueryui-1.11.32.tgz"
59 | },
60 | "license": "MIT",
61 | "main": "",
62 | "maintainers": [
63 | {
64 | "name": "types",
65 | "email": "ryan.cavanaugh@microsoft.com"
66 | }
67 | ],
68 | "name": "@types/jqueryui",
69 | "optionalDependencies": {},
70 | "peerDependencies": {},
71 | "readme": "ERROR: No README data found!",
72 | "repository": {
73 | "type": "git",
74 | "url": "https://www.github.com/DefinitelyTyped/DefinitelyTyped.git"
75 | },
76 | "scripts": {},
77 | "typesPublisherContentHash": "9f81a997f629f00a67922eb97a4218c9e4a519fb9fc585d91488f0086fb70311",
78 | "version": "1.11.32"
79 | }
80 |
--------------------------------------------------------------------------------
/node_modules/@types/jqueryui/types-metadata.json:
--------------------------------------------------------------------------------
1 | {
2 | "authors": "Boris Yankov , John Reilly ",
3 | "libraryDependencies": [
4 | "jquery"
5 | ],
6 | "moduleDependencies": [],
7 | "libraryMajorVersion": 1,
8 | "libraryMinorVersion": 11,
9 | "libraryName": "jQueryUI",
10 | "typingsPackageName": "jqueryui",
11 | "projectName": "http://jqueryui.com/",
12 | "sourceRepoURL": "https://www.github.com/DefinitelyTyped/DefinitelyTyped",
13 | "sourceBranch": "master",
14 | "globals": [],
15 | "declaredModules": [],
16 | "files": [
17 | "index.d.ts"
18 | ],
19 | "hasPackageJson": false,
20 | "contentHash": "9f81a997f629f00a67922eb97a4218c9e4a519fb9fc585d91488f0086fb70311"
21 | }
--------------------------------------------------------------------------------
/node_modules/@types/knockout/README.md:
--------------------------------------------------------------------------------
1 | # Installation
2 | > `npm install --save @types/knockout`
3 |
4 | # Summary
5 | This package contains type definitions for Knockout (http://knockoutjs.com).
6 |
7 | # Details
8 | Files were exported from https://www.github.com/DefinitelyTyped/DefinitelyTyped/tree/master/knockout
9 |
10 | Additional Details
11 | * Last updated: Sat, 11 Mar 2017 01:17:04 GMT
12 | * Dependencies: none
13 | * Global values: ko
14 |
15 | # Credits
16 | These definitions were written by Boris Yankov , Igor Oleinikov , Clément Bourgeois , Matt Brooks .
17 |
--------------------------------------------------------------------------------
/node_modules/@types/knockout/index.d.ts:
--------------------------------------------------------------------------------
1 | // Type definitions for Knockout v3.4.0
2 | // Project: http://knockoutjs.com
3 | // Definitions by: Boris Yankov , Igor Oleinikov , Clément Bourgeois , Matt Brooks
4 | // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
5 |
6 |
7 | interface KnockoutSubscribableFunctions {
8 | [key: string]: KnockoutBindingHandler | undefined;
9 |
10 | notifySubscribers(valueToWrite?: T, event?: string): void;
11 | }
12 |
13 | interface KnockoutComputedFunctions {
14 | [key: string]: KnockoutBindingHandler | undefined;
15 | }
16 |
17 | interface KnockoutObservableFunctions {
18 | [key: string]: KnockoutBindingHandler | undefined;
19 |
20 | equalityComparer(a: any, b: any): boolean;
21 | }
22 |
23 | interface KnockoutObservableArrayFunctions {
24 | // General Array functions
25 | indexOf(searchElement: T, fromIndex?: number): number;
26 | slice(start: number, end?: number): T[];
27 | splice(start: number): T[];
28 | splice(start: number, deleteCount: number, ...items: T[]): T[];
29 | pop(): T;
30 | push(...items: T[]): void;
31 | shift(): T;
32 | unshift(...items: T[]): number;
33 | reverse(): KnockoutObservableArray;
34 | sort(): KnockoutObservableArray;
35 | sort(compareFunction: (left: T, right: T) => number): KnockoutObservableArray;
36 |
37 | // Ko specific
38 | [key: string]: KnockoutBindingHandler | undefined;
39 |
40 | replace(oldItem: T, newItem: T): void;
41 |
42 | remove(item: T): T[];
43 | remove(removeFunction: (item: T) => boolean): T[];
44 | removeAll(items: T[]): T[];
45 | removeAll(): T[];
46 |
47 | destroy(item: T): void;
48 | destroy(destroyFunction: (item: T) => boolean): void;
49 | destroyAll(items: T[]): void;
50 | destroyAll(): void;
51 | }
52 |
53 | interface KnockoutSubscribableStatic {
54 | fn: KnockoutSubscribableFunctions;
55 |
56 | new (): KnockoutSubscribable;
57 | }
58 |
59 | interface KnockoutSubscription {
60 | dispose(): void;
61 | }
62 |
63 | interface KnockoutSubscribable extends KnockoutSubscribableFunctions {
64 | subscribe(callback: (newValue: T) => void, target: any, event: "beforeChange"): KnockoutSubscription;
65 | subscribe(callback: (newValue: T) => void, target?: any, event?: "change"): KnockoutSubscription;
66 | subscribe(callback: (newValue: TEvent) => void, target: any, event: string): KnockoutSubscription;
67 |
68 | extend(requestedExtenders: { [key: string]: any; }): KnockoutSubscribable;
69 | getSubscriptionsCount(): number;
70 | }
71 |
72 | interface KnockoutComputedStatic {
73 | fn: KnockoutComputedFunctions;
74 |
75 | (): KnockoutComputed;
76 | (func: () => T, context?: any, options?: any): KnockoutComputed;
77 | (def: KnockoutComputedDefine, context?: any): KnockoutComputed;
78 | }
79 |
80 | interface KnockoutComputed extends KnockoutObservable, KnockoutComputedFunctions {
81 | fn: KnockoutComputedFunctions;
82 |
83 | dispose(): void;
84 | isActive(): boolean;
85 | getDependenciesCount(): number;
86 | extend(requestedExtenders: { [key: string]: any; }): KnockoutComputed;
87 | }
88 |
89 | interface KnockoutObservableArrayStatic {
90 | fn: KnockoutObservableArrayFunctions;
91 |
92 | (value?: T[] | null): KnockoutObservableArray;
93 | }
94 |
95 | interface KnockoutObservableArray extends KnockoutObservable, KnockoutObservableArrayFunctions {
96 | subscribe(callback: (newValue: KnockoutArrayChange[]) => void, target: any, event: "arrayChange"): KnockoutSubscription;
97 | subscribe(callback: (newValue: T[]) => void, target: any, event: "beforeChange"): KnockoutSubscription;
98 | subscribe(callback: (newValue: T[]) => void, target?: any, event?: "change"): KnockoutSubscription;
99 | subscribe(callback: (newValue: TEvent) => void, target: any, event: string): KnockoutSubscription;
100 |
101 | extend(requestedExtenders: { [key: string]: any; }): KnockoutObservableArray;
102 | }
103 |
104 | interface KnockoutObservableStatic {
105 | fn: KnockoutObservableFunctions;
106 |
107 | (value?: T | null): KnockoutObservable;
108 | }
109 |
110 | interface KnockoutObservable extends KnockoutSubscribable, KnockoutObservableFunctions {
111 | (): T;
112 | (value: T | null): void;
113 |
114 | peek(): T;
115 | valueHasMutated?:{(): void;};
116 | valueWillMutate?:{(): void;};
117 | extend(requestedExtenders: { [key: string]: any; }): KnockoutObservable;
118 | }
119 |
120 | interface KnockoutComputedDefine {
121 | read(): T;
122 | write? (value: T): void;
123 | disposeWhenNodeIsRemoved?: Node;
124 | disposeWhen? (): boolean;
125 | owner?: any;
126 | deferEvaluation?: boolean;
127 | pure?: boolean;
128 | }
129 |
130 | interface KnockoutBindingContext {
131 | $parent: any;
132 | $parents: any[];
133 | $root: any;
134 | $data: any;
135 | $rawData: any | KnockoutObservable;
136 | $index?: KnockoutObservable;
137 | $parentContext?: KnockoutBindingContext;
138 | $component: any;
139 | $componentTemplateNodes: Node[];
140 |
141 | extend(properties: any): any;
142 | createChildContext(dataItemOrAccessor: any, dataItemAlias?: any, extendCallback?: Function): any;
143 | }
144 |
145 | interface KnockoutAllBindingsAccessor {
146 | (): any;
147 | get(name: string): any;
148 | has(name: string): boolean;
149 | }
150 |
151 | interface KnockoutBindingHandler {
152 | after?: Array;
153 | init?: (element: any, valueAccessor: () => any, allBindingsAccessor?: KnockoutAllBindingsAccessor, viewModel?: any, bindingContext?: KnockoutBindingContext) => void | { controlsDescendantBindings: boolean; };
154 | update?: (element: any, valueAccessor: () => any, allBindingsAccessor?: KnockoutAllBindingsAccessor, viewModel?: any, bindingContext?: KnockoutBindingContext) => void;
155 | options?: any;
156 | preprocess?: (value: string, name: string, addBindingCallback?: (name: string, value: string) => void) => string;
157 | }
158 |
159 | interface KnockoutBindingHandlers {
160 | [bindingHandler: string]: KnockoutBindingHandler;
161 |
162 | // Controlling text and appearance
163 | visible: KnockoutBindingHandler;
164 | text: KnockoutBindingHandler;
165 | html: KnockoutBindingHandler;
166 | css: KnockoutBindingHandler;
167 | style: KnockoutBindingHandler;
168 | attr: KnockoutBindingHandler;
169 |
170 | // Control Flow
171 | foreach: KnockoutBindingHandler;
172 | if: KnockoutBindingHandler;
173 | ifnot: KnockoutBindingHandler;
174 | with: KnockoutBindingHandler;
175 |
176 | // Working with form fields
177 | click: KnockoutBindingHandler;
178 | event: KnockoutBindingHandler;
179 | submit: KnockoutBindingHandler;
180 | enable: KnockoutBindingHandler;
181 | disable: KnockoutBindingHandler;
182 | value: KnockoutBindingHandler;
183 | textInput: KnockoutBindingHandler;
184 | hasfocus: KnockoutBindingHandler;
185 | checked: KnockoutBindingHandler;
186 | options: KnockoutBindingHandler;
187 | selectedOptions: KnockoutBindingHandler;
188 | uniqueName: KnockoutBindingHandler;
189 |
190 | // Rendering templates
191 | template: KnockoutBindingHandler;
192 |
193 | // Components (new for v3.2)
194 | component: KnockoutBindingHandler;
195 | }
196 |
197 | interface KnockoutMemoization {
198 | memoize(callback: () => string): string;
199 | unmemoize(memoId: string, callbackParams: any[]): boolean;
200 | unmemoizeDomNodeAndDescendants(domNode: any, extraCallbackParamsArray: any[]): boolean;
201 | parseMemoText(memoText: string): string;
202 | }
203 |
204 | interface KnockoutVirtualElement {}
205 |
206 | interface KnockoutVirtualElements {
207 | allowedBindings: { [bindingName: string]: boolean; };
208 | emptyNode(node: KnockoutVirtualElement ): void;
209 | firstChild(node: KnockoutVirtualElement ): KnockoutVirtualElement;
210 | insertAfter( container: KnockoutVirtualElement, nodeToInsert: Node, insertAfter: Node ): void;
211 | nextSibling(node: KnockoutVirtualElement): Node;
212 | prepend(node: KnockoutVirtualElement, toInsert: Node ): void;
213 | setDomNodeChildren(node: KnockoutVirtualElement, newChildren: { length: number;[index: number]: Node; } ): void;
214 | childNodes(node: KnockoutVirtualElement ): Node[];
215 | }
216 |
217 | interface KnockoutExtenders {
218 | throttle(target: any, timeout: number): KnockoutComputed;
219 | notify(target: any, notifyWhen: string): any;
220 |
221 | rateLimit(target: any, timeout: number): any;
222 | rateLimit(target: any, options: { timeout: number; method?: string; }): any;
223 |
224 | trackArrayChanges(target: any): any;
225 | }
226 |
227 | //
228 | // NOTE TO MAINTAINERS AND CONTRIBUTORS : pay attention to only include symbols that are
229 | // publicly exported in the minified version of ko, without that you can give the false
230 | // impression that some functions will be available in production builds.
231 | //
232 | interface KnockoutUtils {
233 | //////////////////////////////////
234 | // utils.domData.js
235 | //////////////////////////////////
236 |
237 | domData: {
238 | get (node: Element, key: string): any;
239 |
240 | set (node: Element, key: string, value: any): void;
241 |
242 | getAll(node: Element, createIfNotFound: boolean): any;
243 |
244 | clear(node: Element): boolean;
245 | };
246 |
247 | //////////////////////////////////
248 | // utils.domNodeDisposal.js
249 | //////////////////////////////////
250 |
251 | domNodeDisposal: {
252 | addDisposeCallback(node: Element, callback: Function): void;
253 |
254 | removeDisposeCallback(node: Element, callback: Function): void;
255 |
256 | cleanNode(node: Node): Element;
257 |
258 | removeNode(node: Node): void;
259 | };
260 |
261 | addOrRemoveItem(array: T[] | KnockoutObservable, value: T, included: T): void;
262 |
263 | arrayFilter(array: T[], predicate: (item: T) => boolean): T[];
264 |
265 | arrayFirst(array: T[], predicate: (item: T) => boolean, predicateOwner?: any): T;
266 |
267 | arrayForEach(array: T[], action: (item: T, index: number) => void): void;
268 |
269 | arrayGetDistinctValues(array: T[]): T[];
270 |
271 | arrayIndexOf(array: T[], item: T): number;
272 |
273 | arrayMap(array: T[], mapping: (item: T) => U): U[];
274 |
275 | arrayPushAll(array: T[] | KnockoutObservableArray, valuesToPush: T[]): T[];
276 |
277 | arrayRemoveItem(array: any[], itemToRemove: any): void;
278 |
279 | compareArrays(a: T[], b: T[]): Array>;
280 |
281 | extend(target: Object, source: Object): Object;
282 |
283 | fieldsIncludedWithJsonPost: any[];
284 |
285 | getFormFields(form: any, fieldName: string): any[];
286 |
287 | objectForEach(obj: any, action: (key: any, value: any) => void): void;
288 |
289 | parseHtmlFragment(html: string): any[];
290 |
291 | parseJson(jsonString: string): any;
292 |
293 | postJson(urlOrForm: any, data: any, options: any): void;
294 |
295 | peekObservable(value: KnockoutObservable): T;
296 |
297 | range(min: any, max: any): any;
298 |
299 | registerEventHandler(element: any, eventType: any, handler: Function): void;
300 |
301 | setHtml(node: Element, html: () => string): void;
302 |
303 | setHtml(node: Element, html: string): void;
304 |
305 | setTextContent(element: any, textContent: string | KnockoutObservable): void;
306 |
307 | stringifyJson(data: any, replacer?: Function, space?: string): string;
308 |
309 | toggleDomNodeCssClass(node: any, className: string, shouldHaveClass: boolean): void;
310 |
311 | triggerEvent(element: any, eventType: any): void;
312 |
313 | unwrapObservable(value: KnockoutObservable | T): T;
314 |
315 | // NOT PART OF THE MINIFIED API SURFACE (ONLY IN knockout-{version}.debug.js) https://github.com/SteveSanderson/knockout/issues/670
316 | // forceRefresh(node: any): void;
317 | // ieVersion: number;
318 | // isIe6: boolean;
319 | // isIe7: boolean;
320 | // jQueryHtmlParse(html: string): any[];
321 | // makeArray(arrayLikeObject: any): any[];
322 | // moveCleanedNodesToContainerElement(nodes: any[]): HTMLElement;
323 | // replaceDomNodes(nodeToReplaceOrNodeArray: any, newNodesArray: any[]): void;
324 | // setDomNodeChildren(domNode: any, childNodes: any[]): void;
325 | // setElementName(element: any, name: string): void;
326 | // setOptionNodeSelectionState(optionNode: any, isSelected: boolean): void;
327 | // simpleHtmlParse(html: string): any[];
328 | // stringStartsWith(str: string, startsWith: string): boolean;
329 | // stringTokenize(str: string, delimiter: string): string[];
330 | // stringTrim(str: string): string;
331 | // tagNameLower(element: any): string;
332 | }
333 |
334 | interface KnockoutArrayChange {
335 | status: "added" | "deleted" | "retained";
336 | value: T;
337 | index: number;
338 | moved?: number;
339 | }
340 |
341 | //////////////////////////////////
342 | // templateSources.js
343 | //////////////////////////////////
344 |
345 | interface KnockoutTemplateSourcesDomElement {
346 | text(): any;
347 | text(value: any): void;
348 |
349 | data(key: string): any;
350 | data(key: string, value: any): any;
351 | }
352 |
353 | interface KnockoutTemplateAnonymous extends KnockoutTemplateSourcesDomElement {
354 | nodes(): any;
355 | nodes(value: any): void;
356 | }
357 |
358 | interface KnockoutTemplateSources {
359 |
360 | domElement: {
361 | prototype: KnockoutTemplateSourcesDomElement
362 | new (element: Element): KnockoutTemplateSourcesDomElement
363 | };
364 |
365 | anonymousTemplate: {
366 | prototype: KnockoutTemplateAnonymous;
367 | new (element: Element): KnockoutTemplateAnonymous;
368 | };
369 | }
370 |
371 | //////////////////////////////////
372 | // nativeTemplateEngine.js
373 | //////////////////////////////////
374 |
375 | interface KnockoutNativeTemplateEngine {
376 |
377 | renderTemplateSource(templateSource: Object, bindingContext?: KnockoutBindingContext, options?: Object): any[];
378 | }
379 |
380 | //////////////////////////////////
381 | // templateEngine.js
382 | //////////////////////////////////
383 |
384 | interface KnockoutTemplateEngine extends KnockoutNativeTemplateEngine {
385 |
386 | createJavaScriptEvaluatorBlock(script: string): string;
387 |
388 | makeTemplateSource(template: any, templateDocument?: Document): any;
389 |
390 | renderTemplate(template: any, bindingContext: KnockoutBindingContext, options: Object, templateDocument: Document): any;
391 |
392 | isTemplateRewritten(template: any, templateDocument: Document): boolean;
393 |
394 | rewriteTemplate(template: any, rewriterCallback: Function, templateDocument: Document): void;
395 | }
396 |
397 | //////////////////////////////////
398 | // tasks.js
399 | //////////////////////////////////
400 |
401 | interface KnockoutTasks {
402 | scheduler: (callback: Function) => any;
403 | schedule(task: Function): number;
404 | cancel(handle: number): void;
405 | runEarly(): void;
406 | }
407 |
408 | /////////////////////////////////
409 |
410 | interface KnockoutStatic {
411 | utils: KnockoutUtils;
412 | memoization: KnockoutMemoization;
413 |
414 | bindingHandlers: KnockoutBindingHandlers;
415 | getBindingHandler(handler: string): KnockoutBindingHandler;
416 |
417 | virtualElements: KnockoutVirtualElements;
418 | extenders: KnockoutExtenders;
419 |
420 | applyBindings(viewModelOrBindingContext?: any, rootNode?: any): void;
421 | applyBindingsToDescendants(viewModelOrBindingContext: any, rootNode: any): void;
422 | applyBindingAccessorsToNode(node: Node, bindings: (bindingContext: KnockoutBindingContext, node: Node) => {}, bindingContext: KnockoutBindingContext): void;
423 | applyBindingAccessorsToNode(node: Node, bindings: {}, bindingContext: KnockoutBindingContext): void;
424 | applyBindingAccessorsToNode(node: Node, bindings: (bindingContext: KnockoutBindingContext, node: Node) => {}, viewModel: any): void;
425 | applyBindingAccessorsToNode(node: Node, bindings: {}, viewModel: any): void;
426 | applyBindingsToNode(node: Node, bindings: any, viewModelOrBindingContext?: any): any;
427 |
428 | subscribable: KnockoutSubscribableStatic;
429 | observable: KnockoutObservableStatic;
430 |
431 | computed: KnockoutComputedStatic;
432 | pureComputed(evaluatorFunction: () => T, context?: any): KnockoutComputed;
433 | pureComputed(options: KnockoutComputedDefine, context?: any): KnockoutComputed;
434 |
435 | observableArray: KnockoutObservableArrayStatic;
436 |
437 | contextFor(node: any): any;
438 | isSubscribable(instance: any): instance is KnockoutSubscribable;
439 | toJSON(viewModel: any, replacer?: Function, space?: any): string;
440 | toJS(viewModel: any): any;
441 | isObservable(instance: any): instance is KnockoutObservable;
442 | isWriteableObservable(instance: any): instance is KnockoutObservable;
443 | isComputed(instance: any): instance is KnockoutComputed;
444 | dataFor(node: any): any;
445 | removeNode(node: Element): void;
446 | cleanNode(node: Element): Element;
447 | renderTemplate(template: Function, viewModel: any, options?: any, target?: any, renderMode?: any): any;
448 | renderTemplate(template: string, viewModel: any, options?: any, target?: any, renderMode?: any): any;
449 | unwrap(value: KnockoutObservable | T): T;
450 |
451 | computedContext: KnockoutComputedContext;
452 |
453 | //////////////////////////////////
454 | // templateSources.js
455 | //////////////////////////////////
456 |
457 | templateSources: KnockoutTemplateSources;
458 |
459 | //////////////////////////////////
460 | // templateEngine.js
461 | //////////////////////////////////
462 |
463 | templateEngine: {
464 |
465 | prototype: KnockoutTemplateEngine;
466 |
467 | new (): KnockoutTemplateEngine;
468 | };
469 |
470 | //////////////////////////////////
471 | // templateRewriting.js
472 | //////////////////////////////////
473 |
474 | templateRewriting: {
475 |
476 | ensureTemplateIsRewritten(template: Node, templateEngine: KnockoutTemplateEngine, templateDocument: Document): any;
477 | ensureTemplateIsRewritten(template: string, templateEngine: KnockoutTemplateEngine, templateDocument: Document): any;
478 |
479 | memoizeBindingAttributeSyntax(htmlString: string, templateEngine: KnockoutTemplateEngine): any;
480 |
481 | applyMemoizedBindingsToNextSibling(bindings: any, nodeName: string): string;
482 | };
483 |
484 | //////////////////////////////////
485 | // nativeTemplateEngine.js
486 | //////////////////////////////////
487 |
488 | nativeTemplateEngine: {
489 |
490 | prototype: KnockoutNativeTemplateEngine;
491 |
492 | new (): KnockoutNativeTemplateEngine;
493 |
494 | instance: KnockoutNativeTemplateEngine;
495 | };
496 |
497 | //////////////////////////////////
498 | // jqueryTmplTemplateEngine.js
499 | //////////////////////////////////
500 |
501 | jqueryTmplTemplateEngine: {
502 |
503 | prototype: KnockoutTemplateEngine;
504 |
505 | renderTemplateSource(templateSource: Object, bindingContext: KnockoutBindingContext, options: Object): Node[];
506 |
507 | createJavaScriptEvaluatorBlock(script: string): string;
508 |
509 | addTemplate(templateName: string, templateMarkup: string): void;
510 | };
511 |
512 | //////////////////////////////////
513 | // templating.js
514 | //////////////////////////////////
515 |
516 | setTemplateEngine(templateEngine: KnockoutNativeTemplateEngine | undefined): void;
517 |
518 | renderTemplate(template: Function, dataOrBindingContext: KnockoutBindingContext, options: Object, targetNodeOrNodeArray: Node, renderMode: string): any;
519 | renderTemplate(template: any, dataOrBindingContext: KnockoutBindingContext, options: Object, targetNodeOrNodeArray: Node, renderMode: string): any;
520 | renderTemplate(template: Function, dataOrBindingContext: any, options: Object, targetNodeOrNodeArray: Node, renderMode: string): any;
521 | renderTemplate(template: any, dataOrBindingContext: any, options: Object, targetNodeOrNodeArray: Node, renderMode: string): any;
522 | renderTemplate(template: Function, dataOrBindingContext: KnockoutBindingContext, options: Object, targetNodeOrNodeArray: Node[], renderMode: string): any;
523 | renderTemplate(template: any, dataOrBindingContext: KnockoutBindingContext, options: Object, targetNodeOrNodeArray: Node[], renderMode: string): any;
524 | renderTemplate(template: Function, dataOrBindingContext: any, options: Object, targetNodeOrNodeArray: Node[], renderMode: string): any;
525 | renderTemplate(template: any, dataOrBindingContext: any, options: Object, targetNodeOrNodeArray: Node[], renderMode: string): any;
526 |
527 | renderTemplateForEach(template: Function, arrayOrObservableArray: any[], options: Object, targetNode: Node, parentBindingContext: KnockoutBindingContext): any;
528 | renderTemplateForEach(template: any, arrayOrObservableArray: any[], options: Object, targetNode: Node, parentBindingContext: KnockoutBindingContext): any;
529 | renderTemplateForEach(template: Function, arrayOrObservableArray: KnockoutObservable, options: Object, targetNode: Node, parentBindingContext: KnockoutBindingContext): any;
530 | renderTemplateForEach(template: any, arrayOrObservableArray: KnockoutObservable, options: Object, targetNode: Node, parentBindingContext: KnockoutBindingContext): any;
531 |
532 | ignoreDependencies(callback: () => T): T;
533 |
534 | expressionRewriting: {
535 | bindingRewriteValidators: any[];
536 | twoWayBindings: any;
537 | parseObjectLiteral: (objectLiteralString: string) => any[];
538 |
539 | /**
540 | Internal, private KO utility for updating model properties from within bindings
541 | property: If the property being updated is (or might be) an observable, pass it here
542 | If it turns out to be a writable observable, it will be written to directly
543 | allBindings: An object with a get method to retrieve bindings in the current execution context.
544 | This will be searched for a '_ko_property_writers' property in case you're writing to a non-observable
545 | (See note below)
546 | key: The key identifying the property to be written. Example: for { hasFocus: myValue }, write to 'myValue' by specifying the key 'hasFocus'
547 | value: The value to be written
548 | checkIfDifferent: If true, and if the property being written is a writable observable, the value will only be written if
549 | it is !== existing value on that writable observable
550 |
551 | Note that if you need to write to the viewModel without an observable property,
552 | you need to set ko.expressionRewriting.twoWayBindings[key] = true; *before* the binding evaluation.
553 | */
554 | writeValueToProperty: (property: KnockoutObservable | any, allBindings: KnockoutAllBindingsAccessor, key: string, value: any, checkIfDifferent?: boolean) => void;
555 | };
556 |
557 | /////////////////////////////////
558 |
559 | bindingProvider: {
560 | instance: KnockoutBindingProvider;
561 | new (): KnockoutBindingProvider;
562 | }
563 |
564 | /////////////////////////////////
565 | // selectExtensions.js
566 | /////////////////////////////////
567 |
568 | selectExtensions: {
569 |
570 | readValue(element: HTMLElement): any;
571 |
572 | writeValue(element: HTMLElement, value: any): void;
573 | };
574 |
575 | components: KnockoutComponents;
576 |
577 | /////////////////////////////////
578 | // options.js
579 | /////////////////////////////////
580 |
581 | options: {
582 | deferUpdates: boolean,
583 |
584 | useOnlyNativeEvents: boolean
585 | };
586 |
587 | /////////////////////////////////
588 | // tasks.js
589 | /////////////////////////////////
590 |
591 | tasks: KnockoutTasks;
592 |
593 | /////////////////////////////////
594 | // utils.js
595 | /////////////////////////////////
596 |
597 | onError?: (error: Error) => void;
598 | }
599 |
600 | interface KnockoutBindingProvider {
601 | nodeHasBindings(node: Node): boolean;
602 | getBindings(node: Node, bindingContext: KnockoutBindingContext): {};
603 | getBindingAccessors?(node: Node, bindingContext: KnockoutBindingContext): { [key: string]: string; };
604 | }
605 |
606 | interface KnockoutComputedContext {
607 | getDependenciesCount(): number;
608 | isInitial: () => boolean;
609 | isSleeping: boolean;
610 | }
611 |
612 | //
613 | // refactored types into a namespace to reduce global pollution
614 | // and used Union Types to simplify overloads (requires TypeScript 1.4)
615 | //
616 | declare namespace KnockoutComponentTypes {
617 |
618 | interface Config {
619 | viewModel?: ViewModelFunction | ViewModelSharedInstance | ViewModelFactoryFunction | AMDModule;
620 | template: string | Node[]| DocumentFragment | TemplateElement | AMDModule;
621 | synchronous?: boolean;
622 | }
623 |
624 | interface ComponentConfig {
625 | viewModel?: ViewModelFunction | ViewModelSharedInstance | ViewModelFactoryFunction | AMDModule;
626 | template: any;
627 | createViewModel?: any;
628 | }
629 |
630 | interface EmptyConfig {
631 | }
632 |
633 | // common AMD type
634 | interface AMDModule {
635 | require: string;
636 | }
637 |
638 | // viewmodel types
639 | interface ViewModelFunction {
640 | (params?: any): any;
641 | }
642 |
643 | interface ViewModelSharedInstance {
644 | instance: any;
645 | }
646 |
647 | interface ViewModelFactoryFunction {
648 | createViewModel: (params?: any, componentInfo?: ComponentInfo) => any;
649 | }
650 |
651 | interface ComponentInfo {
652 | element: Node;
653 | templateNodes: Node[];
654 | }
655 |
656 | interface TemplateElement {
657 | element: string | Node;
658 | }
659 |
660 | interface Loader {
661 | getConfig? (componentName: string, callback: (result: ComponentConfig | null) => void): void;
662 | loadComponent? (componentName: string, config: ComponentConfig, callback: (result: Definition) => void): void;
663 | loadTemplate? (componentName: string, templateConfig: any, callback: (result: Node[]) => void): void;
664 | loadViewModel? (componentName: string, viewModelConfig: any, callback: (result: any) => void): void;
665 | suppressLoaderExceptions?: boolean;
666 | }
667 |
668 | interface Definition {
669 | template: Node[];
670 | createViewModel? (params: any, options: { element: Node; }): any;
671 | }
672 | }
673 |
674 | interface KnockoutComponents {
675 | // overloads for register method:
676 | register(componentName: string, config: KnockoutComponentTypes.Config | KnockoutComponentTypes.EmptyConfig): void;
677 |
678 | isRegistered(componentName: string): boolean;
679 | unregister(componentName: string): void;
680 | get(componentName: string, callback: (definition: KnockoutComponentTypes.Definition) => void): void;
681 | clearCachedDefinition(componentName: string): void
682 | defaultLoader: KnockoutComponentTypes.Loader;
683 | loaders: KnockoutComponentTypes.Loader[];
684 | getComponentNameForNode(node: Node): string;
685 | }
686 |
687 | declare var ko: KnockoutStatic;
688 |
689 | declare module "knockout" {
690 | export = ko;
691 | }
692 |
--------------------------------------------------------------------------------
/node_modules/@types/knockout/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "_args": [
3 | [
4 | {
5 | "raw": "@types/knockout@^3.4.38",
6 | "scope": "@types",
7 | "escapedName": "@types%2fknockout",
8 | "name": "@types/knockout",
9 | "rawSpec": "^3.4.38",
10 | "spec": ">=3.4.38 <4.0.0",
11 | "type": "range"
12 | },
13 | "/Users/shane/Dropbox/Code/CodeCoverageDashboardWidgets-Dev/node_modules/vss-web-extension-sdk"
14 | ]
15 | ],
16 | "_from": "@types/knockout@>=3.4.38 <4.0.0",
17 | "_id": "@types/knockout@3.4.40",
18 | "_inCache": true,
19 | "_location": "/@types/knockout",
20 | "_npmOperationalInternal": {
21 | "host": "packages-18-east.internal.npmjs.com",
22 | "tmp": "tmp/knockout-3.4.40.tgz_1489195060281_0.2981768895406276"
23 | },
24 | "_npmUser": {
25 | "name": "types",
26 | "email": "ts-npm-types@microsoft.com"
27 | },
28 | "_phantomChildren": {},
29 | "_requested": {
30 | "raw": "@types/knockout@^3.4.38",
31 | "scope": "@types",
32 | "escapedName": "@types%2fknockout",
33 | "name": "@types/knockout",
34 | "rawSpec": "^3.4.38",
35 | "spec": ">=3.4.38 <4.0.0",
36 | "type": "range"
37 | },
38 | "_requiredBy": [
39 | "/vss-web-extension-sdk"
40 | ],
41 | "_resolved": "https://registry.npmjs.org/@types/knockout/-/knockout-3.4.40.tgz",
42 | "_shasum": "5610286f18d0fbacac7dd9019b6e750355ed1055",
43 | "_shrinkwrap": null,
44 | "_spec": "@types/knockout@^3.4.38",
45 | "_where": "/Users/shane/Dropbox/Code/CodeCoverageDashboardWidgets-Dev/node_modules/vss-web-extension-sdk",
46 | "contributors": [
47 | {
48 | "name": "Boris Yankov",
49 | "url": "https://github.com/borisyankov/"
50 | },
51 | {
52 | "name": "Igor Oleinikov",
53 | "url": "https://github.com/Igorbek/"
54 | },
55 | {
56 | "name": "Clément Bourgeois",
57 | "url": "https://github.com/moonpyk/"
58 | },
59 | {
60 | "name": "Matt Brooks",
61 | "url": "https://github.com/EnableSoftware"
62 | }
63 | ],
64 | "dependencies": {},
65 | "description": "TypeScript definitions for Knockout",
66 | "devDependencies": {},
67 | "directories": {},
68 | "dist": {
69 | "shasum": "5610286f18d0fbacac7dd9019b6e750355ed1055",
70 | "tarball": "https://registry.npmjs.org/@types/knockout/-/knockout-3.4.40.tgz"
71 | },
72 | "license": "MIT",
73 | "main": "",
74 | "maintainers": [
75 | {
76 | "name": "types",
77 | "email": "ryan.cavanaugh@microsoft.com"
78 | }
79 | ],
80 | "name": "@types/knockout",
81 | "optionalDependencies": {},
82 | "peerDependencies": {},
83 | "readme": "ERROR: No README data found!",
84 | "repository": {
85 | "type": "git",
86 | "url": "https://www.github.com/DefinitelyTyped/DefinitelyTyped.git"
87 | },
88 | "scripts": {},
89 | "typeScriptVersion": "2.0",
90 | "typesPublisherContentHash": "432018c9a243b3b6317e39820da40cf76cdc7cea4efe0da88898bb2b2f1507f9",
91 | "version": "3.4.40"
92 | }
93 |
--------------------------------------------------------------------------------
/node_modules/@types/q/README.md:
--------------------------------------------------------------------------------
1 | # Installation
2 | > `npm install --save @types/q`
3 |
4 | # Summary
5 | This package contains type definitions for Q (https://github.com/kriskowal/q).
6 |
7 | # Details
8 | Files were exported from https://www.github.com/DefinitelyTyped/DefinitelyTyped/tree/types-2.0/q
9 |
10 | Additional Details
11 | * Last updated: Wed, 05 Oct 2016 20:53:38 GMT
12 | * File structure: UMD
13 | * Library Dependencies: none
14 | * Module Dependencies: none
15 | * Global values: Q
16 |
17 | # Credits
18 | These definitions were written by Barrie Nemetchek , Andrew Gaspar , John Reilly .
19 |
--------------------------------------------------------------------------------
/node_modules/@types/q/index.d.ts:
--------------------------------------------------------------------------------
1 | // Type definitions for Q
2 | // Project: https://github.com/kriskowal/q
3 | // Definitions by: Barrie Nemetchek , Andrew Gaspar , John Reilly
4 | // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
5 |
6 | export = Q;
7 | export as namespace Q;
8 |
9 | /**
10 | * If value is a Q promise, returns the promise.
11 | * If value is a promise from another library it is coerced into a Q promise (where possible).
12 | */
13 | declare function Q(promise: Q.IPromise): Q.Promise;
14 | /**
15 | * If value is not a promise, returns a promise that is fulfilled with value.
16 | */
17 | declare function Q(value: T): Q.Promise;
18 | /**
19 | * Calling with nothing at all creates a void promise
20 | */
21 | declare function Q(): Q.Promise;
22 |
23 | declare namespace Q {
24 | type IWhenable = IPromise | T;
25 | interface IPromise {
26 | then(onFulfill?: (value: T) => IWhenable, onReject?: (error: any) => IWhenable): IPromise;
27 | }
28 |
29 | interface Deferred {
30 | promise: Promise;
31 | resolve(value?: IWhenable): void;
32 | reject(reason: any): void;
33 | notify(value: any): void;
34 | makeNodeResolver(): (reason: any, value: T) => void;
35 | }
36 |
37 | interface Promise {
38 | /**
39 | * Like a finally clause, allows you to observe either the fulfillment or rejection of a promise, but to do so without modifying the final value. This is useful for collecting resources regardless of whether a job succeeded, like closing a database connection, shutting a server down, or deleting an unneeded key from an object.
40 |
41 | * finally returns a promise, which will become resolved with the same fulfillment value or rejection reason as promise. However, if callback returns a promise, the resolution of the returned promise will be delayed until the promise returned from callback is finished.
42 | */
43 | fin(finallyCallback: () => any): Promise;
44 | /**
45 | * Like a finally clause, allows you to observe either the fulfillment or rejection of a promise, but to do so without modifying the final value. This is useful for collecting resources regardless of whether a job succeeded, like closing a database connection, shutting a server down, or deleting an unneeded key from an object.
46 |
47 | * finally returns a promise, which will become resolved with the same fulfillment value or rejection reason as promise. However, if callback returns a promise, the resolution of the returned promise will be delayed until the promise returned from callback is finished.
48 | */
49 | finally(finallyCallback: () => any): Promise;
50 |
51 | /**
52 | * The then method from the Promises/A+ specification, with an additional progress handler.
53 | */
54 | then(onFulfill?: (value: T) => IWhenable, onReject?: (error: any) => IWhenable, onProgress?: Function): Promise;
55 |
56 | /**
57 | * Like then, but "spreads" the array into a variadic fulfillment handler. If any of the promises in the array are rejected, instead calls onRejected with the first rejected promise's rejection reason.
58 | *
59 | * This is especially useful in conjunction with all
60 | */
61 | spread(onFulfill: (...args: any[]) => IWhenable, onReject?: (reason: any) => IWhenable): Promise;
62 |
63 | fail(onRejected: (reason: any) => IWhenable): Promise;
64 |
65 | /**
66 | * A sugar method, equivalent to promise.then(undefined, onRejected).
67 | */
68 | catch(onRejected: (reason: any) => IWhenable): Promise;
69 |
70 | /**
71 | * A sugar method, equivalent to promise.then(undefined, undefined, onProgress).
72 | */
73 | progress(onProgress: (progress: any) => any): Promise;
74 |
75 | /**
76 | * Much like then, but with different behavior around unhandled rejection. If there is an unhandled rejection, either because promise is rejected and no onRejected callback was provided, or because onFulfilled or onRejected threw an error or returned a rejected promise, the resulting rejection reason is thrown as an exception in a future turn of the event loop.
77 | *
78 | * This method should be used to terminate chains of promises that will not be passed elsewhere. Since exceptions thrown in then callbacks are consumed and transformed into rejections, exceptions at the end of the chain are easy to accidentally, silently ignore. By arranging for the exception to be thrown in a future turn of the event loop, so that it won't be caught, it causes an onerror event on the browser window, or an uncaughtException event on Node.js's process object.
79 | *
80 | * Exceptions thrown by done will have long stack traces, if Q.longStackSupport is set to true. If Q.onerror is set, exceptions will be delivered there instead of thrown in a future turn.
81 | *
82 | * The Golden Rule of done vs. then usage is: either return your promise to someone else, or if the chain ends with you, call done to terminate it.
83 | */
84 | done(onFulfilled?: (value: T) => any, onRejected?: (reason: any) => any, onProgress?: (progress: any) => any): void;
85 |
86 | /**
87 | * If callback is a function, assumes it's a Node.js-style callback, and calls it as either callback(rejectionReason) when/if promise becomes rejected, or as callback(null, fulfillmentValue) when/if promise becomes fulfilled. If callback is not a function, simply returns promise.
88 | */
89 | nodeify(callback: (reason: any, value: any) => void): Promise;
90 |
91 | /**
92 | * Returns a promise to get the named property of an object. Essentially equivalent to
93 | *
94 | * promise.then(function (o) {
95 | * return o[propertyName];
96 | * });
97 | */
98 | get(propertyName: String): Promise;
99 | set(propertyName: String, value: any): Promise;
100 | delete(propertyName: String): Promise;
101 | /**
102 | * Returns a promise for the result of calling the named method of an object with the given array of arguments. The object itself is this in the function, just like a synchronous method call. Essentially equivalent to
103 | *
104 | * promise.then(function (o) {
105 | * return o[methodName].apply(o, args);
106 | * });
107 | */
108 | post(methodName: String, args: any[]): Promise;
109 | /**
110 | * Returns a promise for the result of calling the named method of an object with the given variadic arguments. The object itself is this in the function, just like a synchronous method call.
111 | */
112 | invoke(methodName: String, ...args: any[]): Promise;
113 | fapply(args: any[]): Promise;
114 | fcall(...args: any[]): Promise;
115 |
116 | /**
117 | * Returns a promise for an array of the property names of an object. Essentially equivalent to
118 | *
119 | * promise.then(function (o) {
120 | * return Object.keys(o);
121 | * });
122 | */
123 | keys(): Promise;
124 |
125 | /**
126 | * A sugar method, equivalent to promise.then(function () { return value; }).
127 | */
128 | thenResolve(value: U): Promise;
129 | /**
130 | * A sugar method, equivalent to promise.then(function () { throw reason; }).
131 | */
132 | thenReject(reason: any): Promise;
133 |
134 | /**
135 | * Attaches a handler that will observe the value of the promise when it becomes fulfilled, returning a promise for that same value, perhaps deferred but not replaced by the promise returned by the onFulfilled handler.
136 | */
137 | tap(onFulfilled: (value: T) => any): Promise;
138 |
139 | timeout(ms: number, message?: string): Promise;
140 | /**
141 | * Returns a promise that will have the same result as promise, but will only be fulfilled or rejected after at least ms milliseconds have passed.
142 | */
143 | delay(ms: number): Promise;
144 |
145 | /**
146 | * Returns whether a given promise is in the fulfilled state. When the static version is used on non-promises, the result is always true.
147 | */
148 | isFulfilled(): boolean;
149 | /**
150 | * Returns whether a given promise is in the rejected state. When the static version is used on non-promises, the result is always false.
151 | */
152 | isRejected(): boolean;
153 | /**
154 | * Returns whether a given promise is in the pending state. When the static version is used on non-promises, the result is always false.
155 | */
156 | isPending(): boolean;
157 |
158 | valueOf(): any;
159 |
160 | /**
161 | * Returns a "state snapshot" object, which will be in one of three forms:
162 | *
163 | * - { state: "pending" }
164 | * - { state: "fulfilled", value: }
165 | * - { state: "rejected", reason: }
166 | */
167 | inspect(): PromiseState;
168 | }
169 |
170 | interface PromiseState {
171 | /**
172 | * "fulfilled", "rejected", "pending"
173 | */
174 | state: string;
175 | value?: T;
176 | reason?: any;
177 | }
178 |
179 | // If no value provided, returned promise will be of void type
180 | export function when(): Promise;
181 |
182 | // if no fulfill, reject, or progress provided, returned promise will be of same type
183 | export function when(value: IWhenable): Promise;
184 |
185 | // If a non-promise value is provided, it will not reject or progress
186 | export function when(value: IWhenable, onFulfilled: (val: T) => IWhenable, onRejected?: (reason: any) => IWhenable, onProgress?: (progress: any) => any): Promise;
187 |
188 | /**
189 | * Currently "impossible" (and I use the term loosely) to implement due to TypeScript limitations as it is now.
190 | * See: https://github.com/Microsoft/TypeScript/issues/1784 for discussion on it.
191 | */
192 | // export function try(method: Function, ...args: any[]): Promise;
193 |
194 | export function fbind(method: (...args: any[]) => IWhenable, ...args: any[]): (...args: any[]) => Promise;
195 |
196 | export function fcall(method: (...args: any[]) => T, ...args: any[]): Promise;
197 |
198 | export function send(obj: any, functionName: string, ...args: any[]): Promise;
199 | export function invoke(obj: any, functionName: string, ...args: any[]): Promise;
200 | export function mcall(obj: any, functionName: string, ...args: any[]): Promise;
201 |
202 | export function denodeify(nodeFunction: Function, ...args: any[]): (...args: any[]) => Promise;
203 | export function nbind(nodeFunction: Function, thisArg: any, ...args: any[]): (...args: any[]) => Promise;
204 | export function nfbind(nodeFunction: Function, ...args: any[]): (...args: any[]) => Promise;
205 | export function nfcall(nodeFunction: Function, ...args: any[]): Promise;
206 | export function nfapply(nodeFunction: Function, args: any[]): Promise;
207 |
208 | export function ninvoke(nodeModule: any, functionName: string, ...args: any[]): Promise;
209 | export function npost(nodeModule: any, functionName: string, args: any[]): Promise;
210 | export function nsend(nodeModule: any, functionName: string, ...args: any[]): Promise;
211 | export function nmcall(nodeModule: any, functionName: string, ...args: any[]): Promise;
212 |
213 | /**
214 | * Returns a promise that is fulfilled with an array containing the fulfillment value of each promise, or is rejected with the same rejection reason as the first promise to be rejected.
215 | */
216 | export function all(promises: IWhenable<[IWhenable, IWhenable, IWhenable, IWhenable, IWhenable, IWhenable]>): Promise<[A, B, C, D, E, F]>;
217 | /**
218 | * Returns a promise that is fulfilled with an array containing the fulfillment value of each promise, or is rejected with the same rejection reason as the first promise to be rejected.
219 | */
220 | export function all(promises: IWhenable<[IWhenable, IWhenable, IWhenable, IWhenable, IWhenable]>): Promise<[A, B, C, D, E]>;
221 | /**
222 | * Returns a promise that is fulfilled with an array containing the fulfillment value of each promise, or is rejected with the same rejection reason as the first promise to be rejected.
223 | */
224 | export function all(promises: IWhenable<[IWhenable, IWhenable, IWhenable, IWhenable]>): Promise<[A, B, C, D]>;
225 | /**
226 | * Returns a promise that is fulfilled with an array containing the fulfillment value of each promise, or is rejected with the same rejection reason as the first promise to be rejected.
227 | */
228 | export function all(promises: IWhenable<[IWhenable, IWhenable, IWhenable]>): Promise<[A, B, C]>;
229 | /**
230 | * Returns a promise that is fulfilled with an array containing the fulfillment value of each promise, or is rejected with the same rejection reason as the first promise to be rejected.
231 | */
232 | export function all(promises: IWhenable<[IWhenable, IWhenable]>): Promise<[A, B]>;
233 | /**
234 | * Returns a promise that is fulfilled with an array containing the fulfillment value of each promise, or is rejected with the same rejection reason as the first promise to be rejected.
235 | */
236 | export function all(promises: IWhenable[]>): Promise;
237 |
238 | /**
239 | * Returns a promise for the first of an array of promises to become settled.
240 | */
241 | export function race(promises: IWhenable[]): Promise;
242 |
243 | /**
244 | * Returns a promise that is fulfilled with an array of promise state snapshots, but only after all the original promises have settled, i.e. become either fulfilled or rejected.
245 | */
246 | export function allSettled(promises: IWhenable[]>): Promise[]>;
247 |
248 | export function allResolved(promises: IWhenable[]>): Promise[]>;
249 |
250 | /**
251 | * Like then, but "spreads" the array into a variadic fulfillment handler. If any of the promises in the array are rejected, instead calls onRejected with the first rejected promise's rejection reason.
252 | * This is especially useful in conjunction with all.
253 | */
254 | export function spread(promises: IWhenable[], onFulfilled: (...args: T[]) => IWhenable, onRejected?: (reason: any) => IWhenable): Promise;
255 |
256 | /**
257 | * Returns a promise that will have the same result as promise, except that if promise is not fulfilled or rejected before ms milliseconds, the returned promise will be rejected with an Error with the given message. If message is not supplied, the message will be "Timed out after " + ms + " ms".
258 | */
259 | export function timeout(promise: Promise, ms: number, message?: string): Promise;
260 |
261 | /**
262 | * Returns a promise that will have the same result as promise, but will only be fulfilled or rejected after at least ms milliseconds have passed.
263 | */
264 | export function delay(promise: Promise, ms: number): Promise;
265 | /**
266 | * Returns a promise that will have the same result as promise, but will only be fulfilled or rejected after at least ms milliseconds have passed.
267 | */
268 | export function delay(value: T, ms: number): Promise;
269 | /**
270 | * Returns a promise that will be fulfilled with undefined after at least ms milliseconds have passed.
271 | */
272 | export function delay(ms: number): Promise ;
273 | /**
274 | * Returns whether a given promise is in the fulfilled state. When the static version is used on non-promises, the result is always true.
275 | */
276 | export function isFulfilled(promise: Promise