This commit is contained in:
Arne Schubert
2017-10-23 17:19:33 +02:00
28700 changed files with 2436927 additions and 1571067 deletions
+1 -1
View File
@@ -1,9 +1,9 @@
root = true
[*]
indent_size = 4
trim_trailing_whitespace = true
insert_final_newline = true
[{*.json,*.yml}]
indent_style = space
indent_size = 2
-20
View File
@@ -1,22 +1,2 @@
# Auto detect text files and perform LF normalization
* text=auto
# Custom for Visual Studio
*.cs diff=csharp
*.sln merge=union
*.csproj merge=union
*.vbproj merge=union
*.fsproj merge=union
*.dbproj merge=union
# Standard to msysgit
*.doc diff=astextplain
*.DOC diff=astextplain
*.docx diff=astextplain
*.DOCX diff=astextplain
*.dot diff=astextplain
*.DOT diff=astextplain
*.pdf diff=astextplain
*.PDF diff=astextplain
*.rtf diff=astextplain
*.RTF diff=astextplain
+3762
View File
File diff suppressed because it is too large Load Diff
+9
View File
@@ -0,0 +1,9 @@
If you know how to fix the issue, make a pull request instead.
- [ ] I tried using the `@types/xxxx` package and had problems.
- [ ] I tried using the latest stable version of tsc. https://www.npmjs.com/package/typescript
- [ ] I have a question that is inappropriate for [StackOverflow](https://stackoverflow.com/). (Please ask any appropriate questions there).
- [ ] [Mention](https://github.com/blog/821-mention-somebody-they-re-notified) the authors (see `Definitions by:` in `index.d.ts`) so they can respond.
- Authors: @....
If you do not mention the authors the issue will be ignored.
+25
View File
@@ -0,0 +1,25 @@
Please fill in this template.
- [ ] Use a meaningful title for the pull request. Include the name of the package modified.
- [ ] Test the change in your own code. (Compile and run.)
- [ ] Follow the advice from the [readme](https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/README.md#make-a-pull-request).
- [ ] Avoid [common mistakes](https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/README.md#common-mistakes).
- [ ] Run `npm run lint package-name` (or `tsc` if no `tslint.json` is present).
Select one of these and delete the others:
If adding a new definition:
- [ ] The package does not provide its own types, and you can not add them.
- [ ] If this is for an NPM package, match the name. If not, do not conflict with the name of an NPM package.
- [ ] Create it with `dts-gen --dt`, not by basing it on an existing project.
- [ ] `tslint.json` should be present, and `tsconfig.json` should have `noImplicitAny`, `noImplicitThis`, `strictNullChecks`, and `strictFunctionTypes` set to `true`.
If changing an existing definition:
- [ ] Provide a URL to documentation or source code which provides context for the suggested changes: <<url here>>
- [ ] Increase the version number in the header if appropriate.
- [ ] If you are making substantial changes, consider adding a `tslint.json` containing `{ "extends": "dtslint/dt.json" }`.
If removing a declaration:
- [ ] If a package was never on DefinitelyTyped, you don't need to do anything. (If you wrote a package and provided types, you don't need to register it with us.)
- [ ] Delete the package's directory.
- [ ] Add it to `notNeededPackages.json`.
+11 -2
View File
@@ -12,7 +12,6 @@
*.map
*.swp
.DS_Store
npm-debug.log
_Resharper.DefinitelyTyped
bin
@@ -25,18 +24,28 @@ Properties
# test folder
_infrastructure/tests/build
# IntelliJ based IDEs
.idea
*.iml
*.js.map
!*.js/
!scripts/new-package.js
!scripts/not-needed.js
!scripts/lint.js
# npm
node_modules
package-lock.json
npm-debug.log
# Sublime
.sublimets
.settings/launch.json
# Visual Studio Code
.settings/launch.json
.vs
.vscode
# yarn
yarn.lock
+1 -1
View File
@@ -1,6 +1,6 @@
language: node_js
node_js:
- 6.9.2
- node
sudo: false
-50
View File
@@ -1,50 +0,0 @@
import packer = require("3d-bin-packing");
import samchon = require("samchon-framework");
function main(): void
{
///////////////////////////
// CONSTRUCT OBJECTS
///////////////////////////
let wrapperArray: bws.packer.WrapperArray = new packer.WrapperArray();
let instanceArray: bws.packer.InstanceArray = new packer.InstanceArray();
// Wrappers
wrapperArray.push
(
new packer.Wrapper("Large", 1000, 40, 40, 15, 0),
new packer.Wrapper("Medium", 700, 20, 20, 10, 0),
new packer.Wrapper("Small", 500, 15, 15, 8, 0)
);
///////
// Each Instance is repeated #15
///////
instanceArray.insert(instanceArray.end(), 15, new packer.Product("Eraser", 1, 2, 5));
instanceArray.insert(instanceArray.end(), 15, new packer.Product("Book", 15, 30, 3));
instanceArray.insert(instanceArray.end(), 15, new packer.Product("Drink", 3, 3, 10));
instanceArray.insert(instanceArray.end(), 15, new packer.Product("Umbrella", 5, 5, 20));
// Wrappers also can be packed into another Wrapper.
instanceArray.insert(instanceArray.end(), 15, new packer.Wrapper("Notebook-Box", 2000, 30, 40, 4, 2));
instanceArray.insert(instanceArray.end(), 15, new packer.Wrapper("Tablet-Box", 2500, 20, 28, 2, 0));
///////////////////////////
// BEGINS PACKING
///////////////////////////
// CONSTRUCT PACKER
let my_packer: bws.packer.Packer = new packer.Packer(wrapperArray, instanceArray);
///////
// PACK (OPTIMIZE)
let result: bws.packer.WrapperArray = my_packer.optimize();
///////
///////////////////////////
// TRACE PACKING RESULT
///////////////////////////
let xml: samchon.library.XML = result.toXML();
console.log(xml.toString());
}
main();
-1500
View File
File diff suppressed because it is too large Load Diff
-23
View File
@@ -1,23 +0,0 @@
{
"compilerOptions": {
"module": "commonjs",
"lib": [
"es6",
"dom"
],
"noImplicitAny": true,
"noImplicitThis": true,
"strictNullChecks": false,
"baseUrl": "../",
"typeRoots": [
"../"
],
"types": [],
"noEmit": true,
"forceConsistentCasingInFileNames": true
},
"files": [
"index.d.ts",
"3d-bin-packing-tests.ts"
]
}
-1
View File
@@ -1 +0,0 @@
Please see the [contribution guide](http://definitelytyped.org/guides/contributing.html) at [definitelytyped.org](http://definitelytyped.org/guides/contributing.html) for information on how to contribute to DefinitelyTyped.
-1893
View File
File diff suppressed because it is too large Load Diff
-5
View File
@@ -1,5 +0,0 @@
- [ ] I tried using the latest `xxxx/xxxx.d.ts` file in this repo and had problems.
- [ ] I tried using the latest stable version of tsc. https://www.npmjs.com/package/typescript
- [ ] I have a question that is inappropriate for [StackOverflow](https://stackoverflow.com/). (Please ask any appropriate questions there).
- [ ] I want to talk about `xxxx/xxxx.d.ts`.
- The authors of that type definition are cc/ @....
-27
View File
@@ -1,27 +0,0 @@
Please fill in this template.
- [ ] Make your PR against the `master` branch.
- [ ] Use a meaningful title for the pull request. Include the name of the package modified.
- [ ] Test the change in your own code. (Compile and run.)
- [ ] Follow the advice from the [readme](https://github.com/DefinitelyTyped/DefinitelyTyped#make-a-pull-request).
- [ ] Avoid [common mistakes](https://github.com/DefinitelyTyped/DefinitelyTyped#common-mistakes).
- [ ] Run `tsc` without errors.
- [ ] Run `npm run lint package-name` if a `tslint.json` is present.
Select one of these and delete the others:
If adding a new definition:
- [ ] The package does not provide its own types, and you can not add them.
- [ ] If this is for an NPM package, match the name. If not, do not conflict with the name of an NPM package.
- [ ] Create it with `npm run new-package package-name`, not by basing it on an existing project.
- [ ] `tslint.json` should be present, and `tsconfig.json` should have `noImplicitAny`, `noImplicitThis`, and `strictNullChecks` set to `true`.
If changing an existing definition:
- [ ] Provide a URL to documentation or source code which provides context for the suggested changes: <<url here>>
- [ ] Increase the version number in the header if appropriate.
- [ ] If you are making substantial changes, consider adding a `tslint.json` containing `{ "extends": "../tslint.json" }`.
If removing a declaration:
- [ ] If a package was never on DefinitelyTyped, you don't need to do anything. (If you wrote a package and provided types, you don't need to register it with us.)
- [ ] Delete the package's directory.
- [ ] Add it to `notNeededPackages.json`.
+112 -22
View File
@@ -1,4 +1,4 @@
# DefinitelyTyped [![Build Status](https://travis-ci.org/DefinitelyTyped/DefinitelyTyped.png?branch=master)](https://travis-ci.org/DefinitelyTyped/DefinitelyTyped)
# DefinitelyTyped [![Build Status](https://travis-ci.org/DefinitelyTyped/DefinitelyTyped.svg?branch=master)](https://travis-ci.org/DefinitelyTyped/DefinitelyTyped)
[![Join the chat at https://gitter.im/borisyankov/DefinitelyTyped](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/borisyankov/DefinitelyTyped?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
@@ -71,7 +71,9 @@ Add to your `tsconfig.json`:
Create `types/foo/index.d.ts` containing declarations for the module "foo".
You should now be able import from `"foo"` in your code and it will route to the new type definition.
Then build *and* run the code to make sure your type definition actually corresponds to what happens at runtime.
Once you've tested your definitions with real code, make a PR contributing the definition by copying `types/foo` to `DefinitelyTyped/foo` and adding a `tsconfig.json` and `foo-tests.ts`.
Once you've tested your definitions with real code, make a [PR](#make-a-pull-request)
then follow the instructions to [edit an existing package](#edit-an-existing-package) or
[create a new package](#create-a-new-package).
### Make a pull request
@@ -83,11 +85,19 @@ First, [fork](https://guides.github.com/activities/forking/) this repository, in
#### Edit an existing package
* `cd my-package-to-edit`
* `cd types/my-package-to-edit`
* Make changes. Remember to edit tests.
* You may also want to add yourself to "Definitions by" section of the package header.
- This will cause you to be notified (via your GitHub username) whenever someone makes a pull request or issue about the package.
- Do this by adding your name to the end of the line, as in `// Definitions by: Alice <https://github.com/alice>, Bob <https://github.com/bob>`.
* `npm install -g typescript@2.0` and run `tsc`.
- Or if there are more people, it can be multiline
```typescript
// Definitions by: Alice <https://github.com/alice>
// Bob <https://github.com/bob>
// Steve <https://github.com/steve>
// John <https://github.com/john>
```
* If there is a `tslint.json`, run `npm run lint package-name`. Otherwise, run `tsc` in the package directory.
When you make a PR to edit an existing package, `dt-bot` should @-mention previous authors.
If it doesn't, you can do so yourself in the comment associated with the PR.
@@ -110,19 +120,21 @@ Your package should have this structure:
| tsconfig.json | This allows you to run `tsc` within the package. |
| tslint.json | Enables linting. |
Generate these by running `npm run new-package -- new-package-name`.
Generate these by running `npm install -g dts-gen` and `dts-gen --dt --name my-package-name --template module`.
See all options at [dts-gen](https://github.com/Microsoft/dts-gen).
You may edit the `tsconfig.json` to add new files, to add to `"lib"`, or to add the `"jsx"` compiler option.
You may edit the `tsconfig.json` to add new files, to add `"target": "es6"` (needed for async functions), to add to `"lib"`, or to add the `"jsx"` compiler option.
DefinitelyTyped members routinely monitor for new PRs, though keep in mind that the number of other PRs may slow things down.
For a good example package, see [base64-js](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/base64-js).
For a good example package, see [base64-js](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/base64-js).
#### Common mistakes
* First, follow advice from the [handbook](http://www.typescriptlang.org/docs/handbook/declaration-files/do-s-and-don-ts.html).
* Formatting: Either use all tabs, or always use 4 spaces.
* `function sum(nums: number[]): number`: Use `ReadonlyArray` if a function does not write to its parameters.
* `interface Foo { new(): Foo; }`:
This defines a type of objects that are new-able. You probably want `declare class Foo { constructor(); }`.
* `const Class: { new(): IClass; }`:
@@ -133,6 +145,10 @@ For a good example package, see [base64-js](https://github.com/DefinitelyTyped/D
Example where a type parameter is acceptable: `function id<T>(value: T): T;`.
Example where it is not acceptable: `function parseJson<T>(json: string): T;`.
Exception: `new Map<string, number>()` is OK.
* Using the types `Function` and `Object` is almost never a good idea. In 99% of cases it's possible to specify a more specific type. Examples are `(x: number) => number` for [functions](http://www.typescriptlang.org/docs/handbook/functions.html#function-types) and `{ x: number, y: number }` for objects. If there is no certainty at all about the type, [`any`](http://www.typescriptlang.org/docs/handbook/basic-types.html#any) is the right choice, not `Object`. If the only known fact about the type is that it's some object, use the type [`object`](https://www.typescriptlang.org/docs/handbook/release-notes/typescript-2-2.html#object-type), not `Object` or `{ [key: string]: any }`.
* `var foo: string | any`:
When `any` is used in a union type, the resulting type is still `any`. So while the `string` portion of this type annotation may _look_ useful, it in fact offers no additional typechecking over simply using `any`.
Depending on the intention, acceptable alternatives could be `any`, `string`, or `string | object`.
#### Removing a package
@@ -152,23 +168,35 @@ If a package was never on DefinitelyTyped, it does not need to be added to `notN
#### Lint
To lint a package, just add a `tslint.json` to that package containing `{ "extends": "../tslint.json" }`. All new packages must be linted.
To lint a package, just add a `tslint.json` to that package containing `{ "extends": "dtslint/dt.json" }`. All new packages must be linted.
If a `tslint.json` turns rules off, this is because that hasn't been fixed yet. For example:
```json
```js
{
"extends": "../tslint.json",
"extends": "dtslint/dt.json",
"rules": {
// This package uses the Function type, and it will take effort to fix.
"forbidden-types": false
"ban-types": false
}
}
```
(To indicate that a lint rule truly does not apply, use `// tslint:disable:rule-name` or better, `//tslint:disable-next-line:rule-name`.)
(To indicate that a lint rule truly does not apply, use `// tslint:disable rule-name` or better, `//tslint:disable-next-line rule-name`.)
Only `.d.ts` files are linted.
Test the linter by running `npm run lint -- package-name`. Do not use a globally installed tslint.
To assert that an expression is of a given type, use `$ExpectType`. To assert that an expression causes a compile error, use `$ExpectError`.
```js
// $ExpectType void
f(1);
// $ExpectError
f("one");
```
For more details, see [dtslint](https://github.com/Microsoft/dtslint#write-tests) readme.
Test by running `npm run lint package-name` where `package-name` is the name of your package.
This script uses [dtslint](https://github.com/Microsoft/dtslint).
## FAQ
@@ -176,22 +204,24 @@ Test the linter by running `npm run lint -- package-name`. Do not use a globally
#### What exactly is the relationship between this repository and the `@types` packages on NPM?
The `master` branch is automatically published to the `@types` scope on NPM thanks to [types-publisher](https://github.com/Microsoft/types-publisher).
This usually happens within an hour of changes being merged.
#### I've submitted a pull request. How long until it is merged?
It depends, but most pull requests will be merged within a week. PRs that have been approved by an author listed in the definition's header are usually merged more quickly; PRs for new definitions will take more time as they require more review from maintainers. Each PR is reviewed by a TypeScript or DefinitelyTyped team member before being merged, so please be patient as human factors may cause delays. Check the [PR Burndown Board](https://github.com/DefinitelyTyped/DefinitelyTyped/projects/3?card_filter_query=is%3Aopen) to see progress as maintainers work through the open PRs.
#### My PR is merged; when will the `@types` NPM package be updated?
NPM packages should update within a few hours. If it's been more than 24 hours, ping @RyanCavanaugh and @andy-ms on the PR to investigate.
#### I'm writing a definition that depends on another definition. Should I use `<reference types="" />` or an import?
If the module you're referencing is an external module (uses `export`), use an import.
If the module you're referencing is an ambient module (uses `declare module`, or just declares globals), use `<reference types="" />`.
#### What do I do about older versions of typings?
Currently we don't support this, though it is [planned](https://github.com/Microsoft/types-publisher/issues/3).
If you're adding a new major version of a library, you can copy `index.d.ts` to `foo-v2.3.d.ts` and edit `index.d.ts` to be the new version.
#### I notice some packages having a `package.json` here.
Usually you won't need this. When publishing a package we will normally automatically create a `package.json` for it.
A `package.json` may be included for the sake of specifying dependencies. Here's an [example](https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/pikaday/package.json).
A `package.json` may be included for the sake of specifying dependencies. Here's an [example](https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/types/pikaday/package.json).
We do not allow other fields, such as `"description"`, to be defined manually.
Also, if you need to reference an older version of typings, you must do that by adding `"dependencies": { "@types/foo": "x.y.z" }` to the package.json.
@@ -213,7 +243,7 @@ If default imports work in your environment, consider turning on the [`--allowSy
Do not change the type definition if it is accurate.
For an NPM package, `export =` is accurate if `node -p 'require("foo")'` is the export, and `export default` is accurate if `node -p 'require("foo").default'` is the export.
#### I want to use features from TypeScript 2.1.
#### I want to use features from TypeScript 2.1 or above.
Then you will have to add a comment to the last line of your definition header (after `// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped`): `// TypeScript Version: 2.1`.
@@ -224,6 +254,66 @@ If the standard is still a draft, it belongs here.
Use a name beginning with `dom-` and include a link to the standard as the "Project" link in the header.
When it graduates draft mode, we may remove it from DefinitelyTyped and deprecate the associated `@types` package.
#### I want to update a package to a new major version
Before making your change, please create a new subfolder with the current version e.g. `v2`, and copy existing files to it. You will need to:
1. Update the relative paths in `tsconfig.json` as well as `tslint.json`.
2. Add path mapping rules to ensure that tests are running against the intended version.
For example [history v2 `tsconfig.json`](https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/types/history/v2/tsconfig.json) looks like:
```json
{
"compilerOptions": {
"baseUrl": "../../",
"typeRoots": ["../../"],
"paths": {
"history": [ "history/v2" ]
},
},
"files": [
"index.d.ts",
"history-tests.ts"
]
}
```
Please note that unless upgrading something backwards-compatible like `node`, all packages depending of the updated package need a path mapping to it, as well as packages depending on *those*.
For example, `react-router` depends on `history@2`, so [react-router `tsconfig.json`](https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/types/react-router/tsconfig.json) has a path mapping to `"history": [ "history/v2" ]`;
transitively `react-router-bootstrap` (which depends on `react-router`) also adds a path mapping in its [tsconfig.json](https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/types/react-router-bootstrap/tsconfig.json).
Also, `/// <reference types=".." />` will not work with path mapping, so dependencies must use `import`.
#### How do I write definitions for packages that can be used globally and as a module?
The TypeScript handbook contains excellent [general information about writing definitions](https://www.typescriptlang.org/docs/handbook/declaration-files/introduction.html), and also [this example definition file](https://www.typescriptlang.org/docs/handbook/declaration-files/templates/global-modifying-module-d-ts.html) which shows how to create a definition using ES6-style module syntax, while also specifying objects made available to the global scope. This technique is demonstrated practically in the [definition for big.js](https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/types/big.js/index.d.ts), which is a library that can be loaded globally via script tag on a web page, or imported via require or ES6-style imports.
To test how your definition can be used both when referenced globally or as an imported module, create a `test` folder, and place two test files in there. Name one `YourLibraryName-global.test.ts` and the other `YourLibraryName-module.test.ts`. The *global* test file should exercise the definition according to how it would be used in a script loaded on a web page where the library is available on the global scope - in this scenario you should not specify an import statement. The *module* test file should exercise the definition according to how it would be used when imported (including the `import` statement(s)). If you specify a `files` property in your `tsconfig.json` file, be sure to include both test files. A [practical example of this](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/big.js/test) is also available on the big.js definition.
Please note that it is not required to fully exercise the definition in each test file - it is sufficient to test only the globally-accessible elements on the global test file and fully exercise the definition in the module test file, or vice versa.
#### What about scoped packages?
Types for a scoped package `@foo/bar` should go in `types/foo__bar`. Note the double underscore.
When `dts-gen` is used to scaffold a scoped package, the `paths` property has to be manually adapted in the generated
`tsconfig.json` to correctly reference the scoped package:
```json
{
"paths":{
"@foo/bar": ["foo__bar"]
}
}
```
#### The file history in GitHub looks incomplete.
GitHub doesn't [support](http://stackoverflow.com/questions/5646174/how-to-make-github-follow-directory-history-after-renames) file history for renamed files. Use [`git log --follow`](https://www.git-scm.com/docs/git-log) instead.
## License
This project is licensed under the MIT license.
-22
View File
@@ -1,22 +0,0 @@
{
"compilerOptions": {
"module": "commonjs",
"lib": [
"es6"
],
"noImplicitAny": true,
"noImplicitThis": true,
"strictNullChecks": true,
"baseUrl": "../",
"typeRoots": [
"../"
],
"types": [],
"noEmit": true,
"forceConsistentCasingInFileNames": true
},
"files": [
"index.d.ts",
"abs-tests.ts"
]
}
-1
View File
@@ -1 +0,0 @@
{ "extends": "../tslint.json" }
-22
View File
@@ -1,22 +0,0 @@
{
"compilerOptions": {
"module": "commonjs",
"lib": [
"es6"
],
"noImplicitAny": true,
"noImplicitThis": true,
"strictNullChecks": false,
"baseUrl": "../",
"typeRoots": [
"../"
],
"types": [],
"noEmit": true,
"forceConsistentCasingInFileNames": true
},
"files": [
"index.d.ts",
"absolute-tests.ts"
]
}
-113
View File
@@ -1,113 +0,0 @@
// Type definitions for acc-wizard
// Project: https://github.com/sathomas/acc-wizard
// Definitions by: Cyril Schumacher <https://github.com/cyrilschumacher>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
interface AccWizardOptions {
/**
* @summary Add next/prev buttons to panels.
* @type {boolean}
*/
addButtons: boolean;
/**
* @summary Selector for task sidebar.
* @type {string}
*/
sidebar: string;
/**
* @summary Class to indicate the active task in sidebar.
* @type {string}
*/
activeClass: string;
/**
* @summary Class to indicate task is complete.
* @type {string}
*/
completedClass: string;
/**
* @summary Class to indicate task is still pending.
* @type {string}
*/
todoClass: string;
/**
* @summary Class for step buttons within panels.
* @type {string}
*/
stepClass: string;
/**
* @summary Text for next button.
* @type {string}
*/
nextText: string;
/**
* @summary Text for back button.
* @type {string}
*/
backText: string;
/**
* @summary HTML input type for next button. (default: "submit")
* @type {string}
*/
nextType: string;
/**
* @summary HTML input type for back button. (default: "reset")
* @type {string}
*/
backType: string;
/**
* @summary Class(es) for next button.
* @type {string}
*/
nextClasses: string;
/**
* @summary Class(es) for back button.
* @type {string}
*/
backClasses: string;
/**
* @summary Auto-scrolling.
* @type {boolean}
*/
autoScrolling: boolean;
/**
* @summary Function to call on next step.
*/
onNext: Function;
/**
* @summary Function to call on back up.
*/
onBack: Function;
/**
* @summary A chance to hook initialization.
*/
onInit: Function;
/**
* @summary A chance to hook destruction.
*/
onDestroy: Function;
}
/**
* @summary Interface for "acc-wizard" JQuery plugin.
* @author Cyril Schumacher
* @version 1.0
*/
interface JQuery {
accwizard(options?: AccWizardOptions): void;
}
-23
View File
@@ -1,23 +0,0 @@
{
"compilerOptions": {
"module": "commonjs",
"lib": [
"es6",
"dom"
],
"noImplicitAny": true,
"noImplicitThis": true,
"strictNullChecks": false,
"baseUrl": "../",
"typeRoots": [
"../"
],
"types": [],
"noEmit": true,
"forceConsistentCasingInFileNames": true
},
"files": [
"index.d.ts",
"acc-wizard-tests.ts"
]
}
-31
View File
@@ -1,31 +0,0 @@
// Type definitions for accepts 1.3
// Project: https://github.com/jshttp/accepts
// Definitions by: Stefan Reichel <https://github.com/bomret>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
/// <reference types="node" />
import { IncomingMessage } from "http";
declare namespace accepts {
export interface Accepts {
charset(charsets: string[]): string | string[] | boolean;
charset(...charsets: string[]): string | string[] | boolean;
charsets(): string[];
encoding(encodings: string[]): string | string[] | boolean;
encoding(...encodings: string[]): string | string[] | boolean;
encodings(): string[];
language(languages: string[]): string | string[] | boolean;
language(...languages: string[]): string | string[] | boolean;
languages(): string[];
type(types: string[]): string | string[] | boolean;
type(...types: string[]): string | string[] | boolean;
types(): string[];
}
}
declare function accepts(req: IncomingMessage): accepts.Accepts;
export = accepts;
-22
View File
@@ -1,22 +0,0 @@
{
"compilerOptions": {
"module": "commonjs",
"lib": [
"es6"
],
"noImplicitAny": true,
"noImplicitThis": true,
"strictNullChecks": true,
"baseUrl": "../",
"typeRoots": [
"../"
],
"types": [],
"noEmit": true,
"forceConsistentCasingInFileNames": true
},
"files": [
"index.d.ts",
"accepts-tests.ts"
]
}
-1
View File
@@ -1 +0,0 @@
{ "extends": "../tslint.json" }
-74
View File
@@ -1,74 +0,0 @@
// Type definitions for accounting.js 0.3
// Project: http://josscrowcroft.github.io/accounting.js/
// Definitions by: Sergey Gerasimov <https://github.com/gerich-home/>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
declare namespace accounting {
interface CurrencyFormat {
pos: string; // for positive values, eg. "$ 1.00"
neg?: string; // for negative values, eg. "$ (1.00)"
zero?: string; // for zero values, eg. "$ --"
}
interface CurrencySettings<TFormat> {
symbol?: string; // default currency symbol is '$'
format?: TFormat; // controls output: %s = symbol, %v = value/number
decimal?: string; // decimal point separator
thousand?: string; // thousands separator
precision?: number; // decimal places
}
interface NumberSettings {
precision?: number; // default precision on numbers is 0
thousand?: string;
decimal?: string;
}
interface Settings {
currency: CurrencySettings<any>; // IAccountingCurrencySettings<string> or IAccountingCurrencySettings<IAccountingCurrencyFormat>
number: NumberSettings;
}
interface Static {
// format any number into currency
formatMoney(number: number, symbol?: string, precision?: number, thousand?: string, decimal?: string, format?: string): string;
formatMoney(number: number, options: CurrencySettings<string> | CurrencySettings<CurrencyFormat>): string;
formatMoney(numbers: number[], symbol?: string, precision?: number, thousand?: string, decimal?: string, format?: string): string[];
formatMoney(numbers: number[], options: CurrencySettings<string> | CurrencySettings<CurrencyFormat>): string[];
// generic case (any array of numbers)
formatMoney(numbers: any[], symbol?: string, precision?: number, thousand?: string, decimal?: string, format?: string): any[];
formatMoney(numbers: any[], options: CurrencySettings<string> | CurrencySettings<CurrencyFormat>): any[];
// format a list of values for column-display
formatColumn(numbers: number[], symbol?: string, precision?: number, thousand?: string, decimal?: string, format?: string): string[];
formatColumn(numbers: number[], options: CurrencySettings<string> | CurrencySettings<CurrencyFormat>): string[];
formatColumn(numbers: number[][], symbol?: string, precision?: number, thousand?: string, decimal?: string, format?: string): string[][];
formatColumn(numbers: number[][], options: CurrencySettings<string> | CurrencySettings<CurrencyFormat>): string[][];
// format a number with custom precision and localisation
formatNumber(number: number, precision?: number, thousand?: string, decimal?: string): string;
formatNumber(number: number, options: NumberSettings): string;
formatNumber(number: number[], precision?: number, thousand?: string, decimal?: string): string[];
formatNumber(number: number[], options: NumberSettings): string[];
formatNumber(number: any[], precision?: number, thousand?: string, decimal?: string): any[];
formatNumber(number: any[], options: NumberSettings): any[];
// better rounding for floating point numbers
toFixed(number: number, precision?: number): string;
// get a value from any formatted number/currency string
unformat(string: string, decimal?: string): number;
// settings object that controls default parameters for library methods
settings: Settings;
}
}
declare var accounting: accounting.Static;
export = accounting;
export as namespace accounting;
-22
View File
@@ -1,22 +0,0 @@
{
"compilerOptions": {
"module": "commonjs",
"lib": [
"es6"
],
"noImplicitAny": true,
"noImplicitThis": true,
"strictNullChecks": false,
"baseUrl": "../",
"typeRoots": [
"../"
],
"types": [],
"noEmit": true,
"forceConsistentCasingInFileNames": true
},
"files": [
"index.d.ts",
"accounting-tests.ts"
]
}
-1
View File
@@ -1 +0,0 @@
{ "extends": "../tslint.json" }
-2983
View File
File diff suppressed because it is too large Load Diff
-39
View File
@@ -1,39 +0,0 @@
{
"compilerOptions": {
"module": "commonjs",
"lib": [
"es6",
"dom"
],
"noImplicitAny": false,
"noImplicitThis": false,
"strictNullChecks": false,
"baseUrl": "../",
"typeRoots": [
"../"
],
"types": [],
"noEmit": true,
"forceConsistentCasingInFileNames": true
},
"files": [
"index.d.ts",
"test/anchor.ts",
"test/background_tokenizer.ts",
"test/default.ts",
"test/document.ts",
"test/edit_session.ts",
"test/editor1.ts",
"test/editor_highlight_selected_word.ts",
"test/editor_navigation.ts",
"test/editor_text_edit.ts",
"test/multi_select.ts",
"test/placeholder.ts",
"test/range.ts",
"test/range_list.ts",
"test/search.ts",
"test/selection.ts",
"test/token_iterator.ts",
"test/virtual_renderer.ts"
]
}
-147
View File
@@ -1,147 +0,0 @@
// Type definitions for node_acl 0.4.8
// Project: https://github.com/optimalbits/node_acl
// Definitions by: Qubo <https://github.com/tkQubo>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
/// <reference types="bluebird" />
/// <reference types="node"/>
/// <reference types="express"/>
import http = require('http');
import Promise = require("bluebird");
import express = require("express");
type strings = string|string[];
type Value = string|number;
type Values = Value|Value[];
type Action = () => any;
type Callback = (err: Error) => any;
type AnyCallback = (err: Error, obj: any) => any;
type AllowedCallback = (err: Error, allowed: boolean) => any;
type GetUserId = (req: http.IncomingMessage, res: http.ServerResponse) => Value;
interface AclStatic {
new (backend: Backend<any>, logger: Logger, options: Option): Acl;
new (backend: Backend<any>, logger: Logger): Acl;
new (backend: Backend<any>): Acl;
memoryBackend: MemoryBackendStatic;
}
interface Logger {
debug: (msg: string) => any;
}
interface Acl {
addUserRoles: (userId: Value, roles: strings, cb?: Callback) => Promise<void>;
removeUserRoles: (userId: Value, roles: strings, cb?: Callback) => Promise<void>;
userRoles: (userId: Value, cb?: (err: Error, roles: string[]) => any) => Promise<string[]>;
roleUsers: (role: Value, cb?: (err: Error, users: Values) => any) => Promise<any>;
hasRole: (userId: Value, role: string, cb?: (err: Error, isInRole: boolean) => any) => Promise<boolean>;
addRoleParents: (role: string, parents: Values, cb?: Callback) => Promise<void>;
removeRole: (role: string, cb?: Callback) => Promise<void>;
removeResource: (resource: string, cb?: Callback) => Promise<void>;
allow: {
(roles: Values, resources: strings, permissions: strings, cb?: Callback): Promise<void>;
(aclSets: AclSet | AclSet[]): Promise<void>;
}
removeAllow: (role: string, resources: strings, permissions: strings, cb?: Callback) => Promise<void>;
removePermissions: (role: string, resources: strings, permissions: strings, cb?: Function) => Promise<void>;
allowedPermissions: (userId: Value, resources: strings, cb?: AnyCallback) => Promise<void>;
isAllowed: (userId: Value, resources: strings, permissions: strings, cb?: AllowedCallback) => Promise<boolean>;
areAnyRolesAllowed: (roles: strings, resource: strings, permissions: strings, cb?: AllowedCallback) => Promise<any>;
whatResources: (roles: strings, permissions: strings, cb?: AnyCallback) => Promise<any>;
permittedResources: (roles: strings, permissions: strings, cb?: Function) => Promise<void>;
middleware: (numPathComponents?: number, userId?: Value | GetUserId, actions?: strings) => express.RequestHandler;
}
interface Option {
buckets?: BucketsOption;
}
interface BucketsOption {
meta?: string;
parents?: string;
permissions?: string;
resources?: string;
roles?: string;
users?: string;
}
interface AclSet {
roles: strings;
allows: AclAllow[];
}
interface AclAllow {
resources: strings;
permissions: strings;
}
interface MemoryBackend extends Backend<Action[]> { }
interface MemoryBackendStatic {
new (): MemoryBackend;
}
//
// For internal use
//
interface Backend<T> {
begin: () => T;
end: (transaction: T, cb?: Action) => void;
clean: (cb?: Action) => void;
get: (bucket: string, key: Value, cb?: Action) => void;
union: (bucket: string, keys: Value[], cb?: Action) => void;
add: (transaction: T, bucket: string, key: Value, values: Values) => void;
del: (transaction: T, bucket: string, keys: Value[]) => void;
remove: (transaction: T, bucket: string, key: Value, values: Values) => void;
endAsync: Function; //TODO: Give more specific function signature
getAsync: Function;
cleanAsync: Function;
unionAsync: Function;
}
interface Contract {
(args: IArguments): Contract | NoOp;
debug: boolean;
fulfilled: boolean;
args: any[];
checkedParams: string[];
params: (...types: string[]) => Contract | NoOp;
end: () => void;
}
interface NoOp {
params: (...types: string[]) => NoOp;
end: () => void;
}
// for redis backend
import redis = require('redis');
interface AclStatic {
redisBackend: RedisBackendStatic;
}
interface RedisBackend extends Backend<redis.RedisClient> { }
interface RedisBackendStatic {
new (redis: redis.RedisClient, prefix: string): RedisBackend;
new (redis: redis.RedisClient): RedisBackend;
}
// for mongodb backend
import mongo = require('mongodb');
interface AclStatic {
mongodbBackend: MongodbBackendStatic;
}
interface MongodbBackend extends Backend<Callback> { }
interface MongodbBackendStatic {
new (db: mongo.Db, prefix: string, useSingle: boolean): MongodbBackend;
new (db: mongo.Db, prefix: string): MongodbBackend;
new (db: mongo.Db): MongodbBackend;
}
declare var _: AclStatic;
export = _;
-80
View File
@@ -1,80 +0,0 @@
// Sample code from
// https://github.com/OptimalBits/node_acl/blob/master/Readme.md
import Acl = require('acl');
var report = <T>(err: Error, value: T) => {
if (err) {
console.error(err);
}
console.info(value);
};
// Using the memory backend
var acl = new Acl(new Acl.memoryBackend());
// middleware with no optional parameters
acl.middleware();
acl.middleware(1);
acl.middleware(1, () => {
return "joed";
});
acl.middleware(1, () => {
return 2;
});
acl.middleware(1, 'joed');
acl.middleware(3, 'joed', 'post');
// guest is allowed to view blogs
acl.allow('guest', 'blogs', 'view');
// allow function accepts arrays as any parameter
acl.allow('member', 'blogs', ['edit','view', 'delete']);
acl.addUserRoles('joed', 'guest');
acl.addRoleParents('baz', ['foo','bar']);
acl.allow('foo', ['blogs','forums','news'], ['view', 'delete']);
acl.allow('admin', ['blogs','forums'], '*');
acl.allow([
{
roles:['guest','special-member'],
allows:[
{resources:'blogs', permissions:'get'},
{resources:['forums','news'], permissions:['get','put','delete']}
]
},
{
roles:['gold','silver'],
allows:[
{resources:'cash', permissions:['sell','exchange']},
{resources:['account','deposit'], permissions:['put','delete']}
]
}
]);
acl.isAllowed('joed', 'blogs', 'view', (err, res) => {
if (res) {
console.log("User joed is allowed to view blogs");
}
});
acl.isAllowed('jsmith', 'blogs', ['edit','view','delete'])
.then((result) => {
console.dir('jsmith is allowed blogs ' + result);
acl.addUserRoles('jsmith', 'member');
}).then(() =>
acl.isAllowed('jsmith', 'blogs', ['edit','view','delete'])
).then((result) =>
console.dir('jsmith is allowed blogs ' + result)
).then(() => {
acl.allowedPermissions('james', ['blogs','forums'], report);
acl.allowedPermissions('jsmith', ['blogs','forums'], report);
});
-24
View File
@@ -1,24 +0,0 @@
{
"compilerOptions": {
"module": "commonjs",
"lib": [
"es6"
],
"noImplicitAny": true,
"noImplicitThis": true,
"strictNullChecks": false,
"baseUrl": "../",
"typeRoots": [
"../"
],
"types": [],
"noEmit": true,
"forceConsistentCasingInFileNames": true
},
"files": [
"index.d.ts",
"test/index.ts",
"test/mongodbBackend.ts",
"test/redisBackend.ts"
]
}
-258
View File
@@ -1,258 +0,0 @@
// Type definitions for Acorn v4.0.3
// Project: https://github.com/marijnh/acorn
// Definitions by: RReverser <https://github.com/RReverser>, e-cloud <https://github.com/e-cloud>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
/// <reference types="estree" />
export as namespace acorn;
export = acorn;
import * as ESTree from 'estree';
declare namespace acorn {
interface PlainObject {
[name: string]: any;
}
interface PluginsObject {
[name: string]: (p: Parser, config: any) => void;
}
interface Options {
ecmaVersion?: 3 | 5 | 6 | 7 | 8 | 2015 | 2016 | 2017;
sourceType?: 'script' | 'module';
onInsertedSemicolon?: (lastTokEnd: number, lastTokEndLoc?: ESTree.Position) => void;
onTrailingComma?: (lastTokEnd: number, lastTokEndLoc?: ESTree.Position) => void;
allowReserved?: boolean;
allowReturnOutsideFunction?: boolean;
allowImportExportEverywhere?: boolean;
allowHashBang?: boolean;
locations?: boolean;
onToken?: ((token: Token) => any) | Token[];
onComment?: ((
isBlock: boolean, text: string, start: number, end: number, startLoc?: ESTree.Position,
endLoc?: ESTree.Position
) => void) | Comment[];
ranges?: boolean;
program?: ESTree.Program;
sourceFile?: string;
directSourceFile?: string;
preserveParens?: boolean;
plugins?: PlainObject;
}
class Parser {
constructor(options: Options, input: string, startPos?: number);
parse(): ESTree.Program;
}
const plugins: PluginsObject;
const defaultOptions: Options;
class Position implements ESTree.Position {
line: number;
column: number;
constructor(line: number, col: number);
offset(n: number): Position;
}
class SourceLocation implements ESTree.SourceLocation {
start: Position;
end: Position;
source?: string;
constructor(p: Parser, start: Position, end: Position);
}
function getLineInfo(input: string, offset: number): ESTree.Position;
class Node {
type: string;
start: number;
end: number;
loc?: ESTree.SourceLocation;
sourceFile?: string;
range?: [number, number];
constructor(parser: Parser, pos: number, loc: number);
}
interface TokeTypeConfig {
keyword: string;
beforeExpr?: boolean;
startsExpr?: boolean;
isLoop?: boolean;
isAssign?: boolean;
prefix?: boolean;
postfix?: boolean;
binop?: number;
}
class TokenType {
label: string;
keyword: string;
beforeExpr: boolean;
startsExpr: boolean;
isLoop: boolean;
isAssign: boolean;
prefix: boolean;
postfix: boolean;
binop: number;
updateContext: (prevType: TokenType) => void;
constructor(label: string, conf?: TokeTypeConfig);
}
const tokTypes: {
num: TokenType;
regexp: TokenType;
string: TokenType;
name: TokenType;
eof: TokenType;
bracketL: TokenType;
bracketR: TokenType;
braceL: TokenType;
braceR: TokenType;
parenL: TokenType;
parenR: TokenType;
comma: TokenType;
semi: TokenType;
colon: TokenType;
dot: TokenType;
question: TokenType;
arrow: TokenType;
template: TokenType;
ellipsis: TokenType;
backQuote: TokenType;
dollarBraceL: TokenType;
eq: TokenType;
assign: TokenType;
incDec: TokenType;
prefix: TokenType;
logicalOR: TokenType;
logicalAND: TokenType;
bitwiseOR: TokenType;
bitwiseXOR: TokenType;
bitwiseAND: TokenType;
equality: TokenType;
relational: TokenType;
bitShift: TokenType;
plusMin: TokenType;
modulo: TokenType;
star: TokenType;
slash: TokenType;
starstar: TokenType;
_break: TokenType;
_case: TokenType;
_catch: TokenType;
_continue: TokenType;
_debugger: TokenType;
_default: TokenType;
_do: TokenType;
_else: TokenType;
_finally: TokenType;
_for: TokenType;
_function: TokenType;
_if: TokenType;
_return: TokenType;
_switch: TokenType;
_throw: TokenType;
_try: TokenType;
_var: TokenType;
_const: TokenType;
_while: TokenType;
_with: TokenType;
_new: TokenType;
_this: TokenType;
_super: TokenType;
_class: TokenType;
_extends: TokenType;
_export: TokenType;
_import: TokenType;
_null: TokenType;
_true: TokenType;
_false: TokenType;
_in: TokenType;
_instanceof: TokenType;
_typeof: TokenType;
_void: TokenType;
_delete: TokenType;
}
class TokContext {
constructor(token: string, isExpr: boolean, preserveSpace: boolean, override: (p: Parser) => void);
}
const tokContexts: {
b_stat: TokContext;
b_expr: TokContext;
b_tmpl: TokContext;
p_stat: TokContext;
p_expr: TokContext;
q_tmpl: TokContext;
f_expr: TokContext;
};
function isIdentifierStart(code: number, astral?: boolean): boolean;
function isIdentifierChar(code: number, astral?: boolean): boolean;
interface AbstractToken {
start: number;
end: number;
loc?: SourceLocation;
range?: [number, number];
}
interface Comment extends AbstractToken {
type: string;
value: string;
}
class Token {
constructor(p: Parser);
}
interface Token extends AbstractToken {
type: TokenType;
value: any;
}
function isNewLine(code: number): boolean;
const lineBreak: RegExp;
const lineBreakG: RegExp;
const version: string;
interface IParse {
(input: string, options?: Options): ESTree.Program;
}
const parse: IParse;
function parseExpressionAt(input: string, pos?: number, options?: Options): ESTree.Expression;
// todo: here the tokenizer function returns a Parser instance, that is targeting the detail of
// Parser prototype. Someone need this please reade README.md first.
// function tokenizer(options: Options, input: string): Parser;
let parse_dammit: IParse | undefined;
let LooseParser: ILooseParserClass | undefined;
let pluginsLoose: PluginsObject | undefined;
interface ILooseParserClass {
new (input: string, options?: Options): ILooseParser
}
interface ILooseParser {
}
function addLooseExports(parse: IParse, parser: ILooseParserClass, plugins: PluginsObject): void;
}
-22
View File
@@ -1,22 +0,0 @@
{
"compilerOptions": {
"module": "commonjs",
"lib": [
"es6"
],
"noImplicitAny": true,
"noImplicitThis": true,
"strictNullChecks": false,
"baseUrl": "../",
"typeRoots": [
"../"
],
"types": [],
"noEmit": true,
"forceConsistentCasingInFileNames": true
},
"files": [
"index.d.ts",
"acorn-tests.ts"
]
}
-23
View File
@@ -1,23 +0,0 @@
{
"compilerOptions": {
"module": "commonjs",
"lib": [
"es6",
"dom"
],
"noImplicitAny": true,
"noImplicitThis": true,
"strictNullChecks": false,
"baseUrl": "../",
"typeRoots": [
"../"
],
"types": [],
"noEmit": true,
"forceConsistentCasingInFileNames": true
},
"files": [
"index.d.ts",
"actioncable-tests.ts"
]
}
@@ -1,18 +0,0 @@
//open connection to an Excel file
var pathToExcelFile = 'C:\\path\\to\\excel\\file.xlsx';
var conn = new ActiveXObject('ADODB.Connection');
conn.Provider = 'Microsoft.ACE.OLEDB.12.0';
conn.ConnectionString =
'Data Source="' + pathToExcelFile + '";' +
'Extended Properties="Excel 12.0;HDR=Yes"';
conn.Open();
//create a Command to access the data
var cmd = new ActiveXObject('ADODB.Command');
cmd.CommandText = 'SELECT DISTINCT LastName, CityName FROM [Sheet1$]';
//get a Recordset
var rs = cmd.Execute();
//build a string from the Recordset
var s = rs.GetString(ADODB.StringFormatEnum.adClipString, -1, '\t', '\n', '(NULL)');
rs.Close();
WScript.Echo(s);
-834
View File
@@ -1,834 +0,0 @@
// Type definitions for Microsoft ActiveX Data Objects
// Project: https://msdn.microsoft.com/en-us/library/windows/desktop/ms675532(v=vs.85).aspx
// Definitions by: Zev Spitz <https://github.com/zspitz>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
declare namespace ADODB {
//Enums
const enum ADCPROP_ASYNCTHREADPRIORITY_ENUM {
adPriorityAboveNormal = 4,
adPriorityBelowNormal = 2,
adPriorityHighest = 5,
adPriorityLowest = 1,
adPriorityNormal = 3
}
const enum ADCPROP_AUTORECALC_ENUM {
adRecalcAlways = 1,
adRecalcUpFront = 0
}
const enum ADCPROP_UPDATECRITERIA_ENUM {
adCriteriaAllCols = 1,
adCriteriaKey = 0,
adCriteriaTimeStamp = 3,
adCriteriaUpdCols = 2
}
const enum ADCPROP_UPDATERESYNC_ENUM {
adResyncAll = 15,
adResyncAutoIncrement = 1,
adResyncConflicts = 2,
adResyncInserts = 8,
adResyncNone = 0,
adResyncUpdates = 4
}
const enum AffectEnum {
adAffectAll = 3,
adAffectAllChapters = 4,
adAffectCurrent = 1,
adAffectGroup = 2
}
const enum BookmarkEnum {
adBookmarkCurrent = 0,
adBookmarkFirst = 1,
adBookmarkLast = 2
}
const enum CommandTypeEnum {
adCmdFile = 256,
adCmdStoredProc = 4,
adCmdTable = 2,
adCmdTableDirect = 512,
adCmdText = 1,
adCmdUnknown = 8,
adCmdUnspecified = -1
}
const enum CompareEnum {
adCompareEqual = 1,
adCompareGreaterThan = 2,
adCompareLessThan = 0,
adCompareNotComparable = 4,
adCompareNotEqual = 3
}
const enum ConnectModeEnum {
adModeRead = 1,
adModeReadWrite = 3,
adModeRecursive = 4194304,
adModeShareDenyNone = 16,
adModeShareDenyRead = 4,
adModeShareDenyWrite = 8,
adModeShareExclusive = 12,
adModeUnknown = 0,
adModeWrite = 2
}
const enum ConnectOptionEnum {
adAsyncConnect = 16,
adConnectUnspecified = -1
}
const enum ConnectPromptEnum {
adPromptAlways = 1,
adPromptComplete = 2,
adPromptCompleteRequired = 3,
adPromptNever = 4
}
const enum CopyRecordOptionsEnum {
adCopyAllowEmulation = 4,
adCopyNonRecursive = 2,
adCopyOverWrite = 1,
adCopyUnspecified = -1
}
const enum CursorLocationEnum {
adUseClient = 3,
adUseClientBatch = 3,
adUseNone = 1,
adUseServer = 2
}
const enum CursorOptionEnum {
adAddNew = 16778240,
adApproxPosition = 16384,
adBookmark = 8192,
adDelete = 16779264,
adFind = 524288,
adHoldRecords = 256,
adIndex = 8388608,
adMovePrevious = 512,
adNotify = 262144,
adResync = 131072,
adSeek = 4194304,
adUpdate = 16809984,
adUpdateBatch = 65536
}
const enum CursorTypeEnum {
adOpenDynamic = 2,
adOpenForwardOnly = 0,
adOpenKeyset = 1,
adOpenStatic = 3,
adOpenUnspecified = -1
}
const enum DataTypeEnum {
adArray = 8192,
adBigInt = 20,
adBinary = 128,
adBoolean = 11,
adBSTR = 8,
adChapter = 136,
adChar = 129,
adCurrency = 6,
adDate = 7,
adDBDate = 133,
adDBTime = 134,
adDBTimeStamp = 135,
adDecimal = 14,
adDouble = 5,
adEmpty = 0,
adError = 10,
adFileTime = 64,
adGUID = 72,
adIDispatch = 9,
adInteger = 3,
adIUnknown = 13,
adLongVarBinary = 205,
adLongVarChar = 201,
adLongVarWChar = 203,
adNumeric = 131,
adPropVariant = 138,
adSingle = 4,
adSmallInt = 2,
adTinyInt = 16,
adUnsignedBigInt = 21,
adUnsignedInt = 19,
adUnsignedSmallInt = 18,
adUnsignedTinyInt = 17,
adUserDefined = 132,
adVarBinary = 204,
adVarChar = 200,
adVariant = 12,
adVarNumeric = 139,
adVarWChar = 202,
adWChar = 130
}
const enum EditModeEnum {
adEditAdd = 2,
adEditDelete = 4,
adEditInProgress = 1,
adEditNone = 0
}
const enum ErrorValueEnum {
adErrBoundToCommand = 3707,
adErrCannotComplete = 3732,
adErrCantChangeConnection = 3748,
adErrCantChangeProvider = 3220,
adErrCantConvertvalue = 3724,
adErrCantCreate = 3725,
adErrCatalogNotSet = 3747,
adErrColumnNotOnThisRow = 3726,
adErrConnectionStringTooLong = 3754,
adErrDataConversion = 3421,
adErrDataOverflow = 3721,
adErrDelResOutOfScope = 3738,
adErrDenyNotSupported = 3750,
adErrDenyTypeNotSupported = 3751,
adErrFeatureNotAvailable = 3251,
adErrFieldsUpdateFailed = 3749,
adErrIllegalOperation = 3219,
adErrIntegrityViolation = 3719,
adErrInTransaction = 3246,
adErrInvalidArgument = 3001,
adErrInvalidConnection = 3709,
adErrInvalidParamInfo = 3708,
adErrInvalidTransaction = 3714,
adErrInvalidURL = 3729,
adErrItemNotFound = 3265,
adErrNoCurrentRecord = 3021,
adErrNotExecuting = 3715,
adErrNotReentrant = 3710,
adErrObjectClosed = 3704,
adErrObjectInCollection = 3367,
adErrObjectNotSet = 3420,
adErrObjectOpen = 3705,
adErrOpeningFile = 3002,
adErrOperationCancelled = 3712,
adErrOutOfSpace = 3734,
adErrPermissionDenied = 3720,
adErrPropConflicting = 3742,
adErrPropInvalidColumn = 3739,
adErrPropInvalidOption = 3740,
adErrPropInvalidValue = 3741,
adErrPropNotAllSettable = 3743,
adErrPropNotSet = 3744,
adErrPropNotSettable = 3745,
adErrPropNotSupported = 3746,
adErrProviderFailed = 3000,
adErrProviderNotFound = 3706,
adErrProviderNotSpecified = 3753,
adErrReadFile = 3003,
adErrResourceExists = 3731,
adErrResourceLocked = 3730,
adErrResourceOutOfScope = 3735,
adErrSchemaViolation = 3722,
adErrSignMismatch = 3723,
adErrStillConnecting = 3713,
adErrStillExecuting = 3711,
adErrTreePermissionDenied = 3728,
adErrUnavailable = 3736,
adErrUnsafeOperation = 3716,
adErrURLDoesNotExist = 3727,
adErrURLNamedRowDoesNotExist = 3737,
adErrVolumeNotFound = 3733,
adErrWriteFile = 3004,
adwrnSecurityDialog = 3717,
adwrnSecurityDialogHeader = 3718
}
const enum EventReasonEnum {
adRsnAddNew = 1,
adRsnClose = 9,
adRsnDelete = 2,
adRsnFirstChange = 11,
adRsnMove = 10,
adRsnMoveFirst = 12,
adRsnMoveLast = 15,
adRsnMoveNext = 13,
adRsnMovePrevious = 14,
adRsnRequery = 7,
adRsnResynch = 8,
adRsnUndoAddNew = 5,
adRsnUndoDelete = 6,
adRsnUndoUpdate = 4,
adRsnUpdate = 3
}
const enum EventStatusEnum {
adStatusCancel = 4,
adStatusCantDeny = 3,
adStatusErrorsOccurred = 2,
adStatusOK = 1,
adStatusUnwantedEvent = 5
}
const enum ExecuteOptionEnum {
adAsyncExecute = 16,
adAsyncFetch = 32,
adAsyncFetchNonBlocking = 64,
adExecuteNoRecords = 128,
adExecuteRecord = 2048,
adExecuteStream = 1024,
adOptionUnspecified = -1
}
const enum FieldAttributeEnum {
adFldCacheDeferred = 4096,
adFldFixed = 16,
adFldIsChapter = 8192,
adFldIsCollection = 262144,
adFldIsDefaultStream = 131072,
adFldIsNullable = 32,
adFldIsRowURL = 65536,
adFldKeyColumn = 32768,
adFldLong = 128,
adFldMayBeNull = 64,
adFldMayDefer = 2,
adFldNegativeScale = 16384,
adFldRowID = 256,
adFldRowVersion = 512,
adFldUnknownUpdatable = 8,
adFldUnspecified = -1,
adFldUpdatable = 4
}
const enum FieldEnum {
adDefaultStream = -1,
adRecordURL = -2
}
const enum FieldStatusEnum {
adFieldAlreadyExists = 26,
adFieldBadStatus = 12,
adFieldCannotComplete = 20,
adFieldCannotDeleteSource = 23,
adFieldCantConvertValue = 2,
adFieldCantCreate = 7,
adFieldDataOverflow = 6,
adFieldDefault = 13,
adFieldDoesNotExist = 16,
adFieldIgnore = 15,
adFieldIntegrityViolation = 10,
adFieldInvalidURL = 17,
adFieldIsNull = 3,
adFieldOK = 0,
adFieldOutOfSpace = 22,
adFieldPendingChange = 262144,
adFieldPendingDelete = 131072,
adFieldPendingInsert = 65536,
adFieldPendingUnknown = 524288,
adFieldPendingUnknownDelete = 1048576,
adFieldPermissionDenied = 9,
adFieldReadOnly = 24,
adFieldResourceExists = 19,
adFieldResourceLocked = 18,
adFieldResourceOutOfScope = 25,
adFieldSchemaViolation = 11,
adFieldSignMismatch = 5,
adFieldTruncated = 4,
adFieldUnavailable = 8,
adFieldVolumeNotFound = 21
}
const enum FilterGroupEnum {
adFilterAffectedRecords = 2,
adFilterConflictingRecords = 5,
adFilterFetchedRecords = 3,
adFilterNone = 0,
adFilterPendingRecords = 1,
adFilterPredicate = 4
}
const enum GetRowsOptionEnum {
adGetRowsRest = -1
}
const enum IsolationLevelEnum {
adXactBrowse = 256,
adXactChaos = 16,
adXactCursorStability = 4096,
adXactIsolated = 1048576,
adXactReadCommitted = 4096,
adXactReadUncommitted = 256,
adXactRepeatableRead = 65536,
adXactSerializable = 1048576,
adXactUnspecified = -1
}
const enum LineSeparatorEnum {
adCR = 13,
adCRLF = -1,
adLF = 10
}
const enum LockTypeEnum {
adLockBatchOptimistic = 4,
adLockOptimistic = 3,
adLockPessimistic = 2,
adLockReadOnly = 1,
adLockUnspecified = -1
}
const enum MarshalOptionsEnum {
adMarshalAll = 0,
adMarshalModifiedOnly = 1
}
const enum MoveRecordOptionsEnum {
adMoveAllowEmulation = 4,
adMoveDontUpdateLinks = 2,
adMoveOverWrite = 1,
adMoveUnspecified = -1
}
const enum ObjectStateEnum {
adStateClosed = 0,
adStateConnecting = 2,
adStateExecuting = 4,
adStateFetching = 8,
adStateOpen = 1
}
const enum ParameterAttributesEnum {
adParamLong = 128,
adParamNullable = 64,
adParamSigned = 16
}
const enum ParameterDirectionEnum {
adParamInput = 1,
adParamInputOutput = 3,
adParamOutput = 2,
adParamReturnValue = 4,
adParamUnknown = 0
}
const enum PersistFormatEnum {
adPersistADTG = 0,
adPersistXML = 1
}
const enum PositionEnum {
adPosBOF = -2,
adPosEOF = -3,
adPosUnknown = -1
}
const enum PositionEnum_Param {
adPosBOF = -2,
adPosEOF = -3,
adPosUnknown = -1
}
const enum PropertyAttributesEnum {
adPropNotSupported = 0,
adPropOptional = 2,
adPropRead = 512,
adPropRequired = 1,
adPropWrite = 1024
}
const enum RecordCreateOptionsEnum {
adCreateCollection = 8192,
adCreateNonCollection = 0,
adCreateOverwrite = 67108864,
adCreateStructDoc = -2147483648,
adFailIfNotExists = -1,
adOpenIfExists = 33554432
}
const enum RecordOpenOptionsEnum {
adDelayFetchFields = 32768,
adDelayFetchStream = 16384,
adOpenAsync = 4096,
adOpenExecuteCommand = 65536,
adOpenOutput = 8388608,
adOpenRecordUnspecified = -1,
adOpenSource = 8388608
}
const enum RecordStatusEnum {
adRecCanceled = 256,
adRecCantRelease = 1024,
adRecConcurrencyViolation = 2048,
adRecDBDeleted = 262144,
adRecDeleted = 4,
adRecIntegrityViolation = 4096,
adRecInvalid = 16,
adRecMaxChangesExceeded = 8192,
adRecModified = 2,
adRecMultipleChanges = 64,
adRecNew = 1,
adRecObjectOpen = 16384,
adRecOK = 0,
adRecOutOfMemory = 32768,
adRecPendingChanges = 128,
adRecPermissionDenied = 65536,
adRecSchemaViolation = 131072,
adRecUnmodified = 8
}
const enum RecordTypeEnum {
adCollectionRecord = 1,
adSimpleRecord = 0,
adStructDoc = 2
}
const enum ResyncEnum {
adResyncAllValues = 2,
adResyncUnderlyingValues = 1
}
const enum SaveOptionsEnum {
adSaveCreateNotExist = 1,
adSaveCreateOverWrite = 2
}
const enum SchemaEnum {
adSchemaActions = 41,
adSchemaAsserts = 0,
adSchemaCatalogs = 1,
adSchemaCharacterSets = 2,
adSchemaCheckConstraints = 5,
adSchemaCollations = 3,
adSchemaColumnPrivileges = 13,
adSchemaColumns = 4,
adSchemaColumnsDomainUsage = 11,
adSchemaCommands = 42,
adSchemaConstraintColumnUsage = 6,
adSchemaConstraintTableUsage = 7,
adSchemaCubes = 32,
adSchemaDBInfoKeywords = 30,
adSchemaDBInfoLiterals = 31,
adSchemaDimensions = 33,
adSchemaForeignKeys = 27,
adSchemaFunctions = 40,
adSchemaHierarchies = 34,
adSchemaIndexes = 12,
adSchemaKeyColumnUsage = 8,
adSchemaLevels = 35,
adSchemaMeasures = 36,
adSchemaMembers = 38,
adSchemaPrimaryKeys = 28,
adSchemaProcedureColumns = 29,
adSchemaProcedureParameters = 26,
adSchemaProcedures = 16,
adSchemaProperties = 37,
adSchemaProviderSpecific = -1,
adSchemaProviderTypes = 22,
adSchemaReferentialConstraints = 9,
adSchemaReferentialContraints = 9,
adSchemaSchemata = 17,
adSchemaSets = 43,
adSchemaSQLLanguages = 18,
adSchemaStatistics = 19,
adSchemaTableConstraints = 10,
adSchemaTablePrivileges = 14,
adSchemaTables = 20,
adSchemaTranslations = 21,
adSchemaTrustees = 39,
adSchemaUsagePrivileges = 15,
adSchemaViewColumnUsage = 24,
adSchemaViews = 23,
adSchemaViewTableUsage = 25
}
const enum SearchDirection {
adSearchBackward = -1,
adSearchForward = 1
}
const enum SearchDirectionEnum {
adSearchBackward = -1,
adSearchForward = 1
}
const enum SeekEnum {
adSeekAfter = 8,
adSeekAfterEQ = 4,
adSeekBefore = 32,
adSeekBeforeEQ = 16,
adSeekFirstEQ = 1,
adSeekLastEQ = 2
}
const enum StreamOpenOptionsEnum {
adOpenStreamAsync = 1,
adOpenStreamFromRecord = 4,
adOpenStreamUnspecified = -1
}
const enum StreamReadEnum {
adReadAll = -1,
adReadLine = -2
}
const enum StreamTypeEnum {
adTypeBinary = 1,
adTypeText = 2
}
const enum StreamWriteEnum {
adWriteChar = 0,
adWriteLine = 1,
stWriteChar = 0,
stWriteLine = 1
}
const enum StringFormatEnum {
adClipString = 2
}
const enum XactAttributeEnum {
adXactAbortRetaining = 262144,
adXactAsyncPhaseOne = 524288,
adXactCommitRetaining = 131072,
adXactSyncPhaseOne = 1048576
}
//Interfaces
interface Command {
ActiveConnection: Connection;
Cancel: () => void;
CommandStream: any /*VT_UNKNOWN*/;
CommandText: string;
CommandTimeout: number;
CommandType: CommandTypeEnum;
CreateParameter: (Name?: string, Type?: DataTypeEnum, Direction?: ParameterDirectionEnum, Size?: number, Value?: any) => Parameter;
Dialect: string;
Execute: (RecordsAffected?: any, Parameters?: any, Options?: number) => Recordset;
Name: string;
NamedParameters: boolean;
Parameters: Parameters;
Prepared: boolean;
Properties: Properties;
State: number;
}
interface Connection {
Attributes: number;
BeginTrans: () => number;
Cancel: () => void;
Close: () => void;
CommandTimeout: number;
CommitTrans: () => void;
ConnectionString: string;
ConnectionTimeout: number;
CursorLocation: CursorLocationEnum;
DefaultDatabase: string;
Errors: Errors;
Execute: (CommandText: string, RecordsAffected: any, Options?: number) => Recordset;
IsolationLevel: IsolationLevelEnum;
Mode: ConnectModeEnum;
Open: (ConnectionString?: string, UserID?: string, Password?: string, Options?: number) => void;
OpenSchema: (Schema: SchemaEnum, Restrictions?: any, SchemaID?: any) => Recordset;
Properties: Properties;
Provider: string;
RollbackTrans: () => void;
State: number;
Version: string;
}
interface Error {
Description: string;
HelpContext: number;
HelpFile: string;
NativeError: number;
Number: number;
Source: string;
SQLState: string;
}
interface Errors {
Clear: () => void;
Count: number;
Item: (Index: any) => Error;
Refresh: () => void;
}
interface Field {
ActualSize: number;
AppendChunk: (Data: any) => void;
Attributes: number;
DataFormat: any /*VT_UNKNOWN*/;
DefinedSize: number;
GetChunk: (Length: number) => any;
Name: string;
NumericScale: number;
OriginalValue: any;
Precision: number;
Properties: Properties;
Status: number;
Type: DataTypeEnum;
UnderlyingValue: any;
Value: any;
}
interface Fields {
_Append: (Name: string, Type: DataTypeEnum, DefinedSize?: number, Attrib?: FieldAttributeEnum) => void;
Append: (Name: string, Type: DataTypeEnum, DefinedSize?: number, Attrib?: FieldAttributeEnum, FieldValue?: any) => void;
CancelUpdate: () => void;
Count: number;
Delete: (Index: any) => void;
Item: (Index: any) => Field;
Refresh: () => void;
Resync: (ResyncValues?: ResyncEnum) => void;
Update: () => void;
}
interface Parameter {
AppendChunk: (Val: any) => void;
Attributes: number;
Direction: ParameterDirectionEnum;
Name: string;
NumericScale: number;
Precision: number;
Properties: Properties;
Size: number;
Type: DataTypeEnum;
Value: any;
}
interface Parameters {
Append: (Object: any /*VT_DISPATCH*/) => void;
Count: number;
Delete: (Index: any) => void;
Item: (Index: any) => Parameter;
Refresh: () => void;
}
interface Properties {
Count: number;
Item: (Index: any) => Property;
Refresh: () => void;
}
interface Property {
Attributes: number;
Name: string;
Type: DataTypeEnum;
Value: any;
}
interface Record {
ActiveConnection: any;
Cancel: () => void;
Close: () => void;
CopyRecord: (Source?: string, Destination?: string, UserName?: string, Password?: string, Options?: CopyRecordOptionsEnum, Async?: boolean) => string;
DeleteRecord: (Source?: string, Async?: boolean) => void;
Fields: Fields;
GetChildren: () => Recordset;
Mode: ConnectModeEnum;
MoveRecord: (Source?: string, Destination?: string, UserName?: string, Password?: string, Options?: MoveRecordOptionsEnum, Async?: boolean) => string;
Open: (Source: any, ActiveConnection: any, Mode?: ConnectModeEnum, CreateOptions?: RecordCreateOptionsEnum, Options?: RecordOpenOptionsEnum, UserName?: string, Password?: string) => void;
ParentURL: string;
Properties: Properties;
RecordType: RecordTypeEnum;
Source: any;
State: ObjectStateEnum;
}
interface Recordset {
_xClone: () => Recordset;
_xResync: (AffectRecords?: AffectEnum) => void;
_xSave: (FileName?: string, PersistFormat?: PersistFormatEnum) => void;
AbsolutePage: PositionEnum;
AbsolutePosition: PositionEnum;
ActiveCommand: any /*VT_DISPATCH*/;
ActiveConnection: any /*VT_DISPATCH*/;
AddNew: (FieldList?: any, Values?: any) => void;
BOF: boolean;
Bookmark: any;
CacheSize: number;
Cancel: () => void;
CancelBatch: (AffectRecords?: AffectEnum) => void;
CancelUpdate: () => void;
Clone: (LockType?: LockTypeEnum) => Recordset;
Close: () => void;
Collect: (Index: any) => any; //Also has setter with parameters
CompareBookmarks: (Bookmark1: any, Bookmark2: any) => CompareEnum;
CursorLocation: CursorLocationEnum;
CursorType: CursorTypeEnum;
DataMember: string;
DataSource: any /*VT_UNKNOWN*/;
Delete: (AffectRecords?: AffectEnum) => void;
EditMode: EditModeEnum;
EOF: boolean;
Fields: Fields;
Filter: any;
Find: (Criteria: string, SkipRecords?: number, SearchDirection?: SearchDirectionEnum, Start?: any) => void;
GetRows: (Rows?: number, Start?: any, Fields?: any) => any;
GetString: (StringFormat?: StringFormatEnum, NumRows?: number, ColumnDelimeter?: string, RowDelimeter?: string, NullExpr?: string) => string;
Index: string;
LockType: LockTypeEnum;
MarshalOptions: MarshalOptionsEnum;
MaxRecords: number;
Move: (NumRecords: number, Start?: any) => void;
MoveFirst: () => void;
MoveLast: () => void;
MoveNext: () => void;
MovePrevious: () => void;
NextRecordset: (RecordsAffected?: any) => Recordset;
Open: (Source: any, ActiveConnection: any, CursorType?: CursorTypeEnum, LockType?: LockTypeEnum, Options?: number) => void;
PageCount: number;
PageSize: number;
Properties: Properties;
RecordCount: number;
Requery: (Options?: number) => void;
Resync: (AffectRecords?: AffectEnum, ResyncValues?: ResyncEnum) => void;
Save: (Destination: any, PersistFormat?: PersistFormatEnum) => void;
Seek: (KeyValues: any, SeekOption?: SeekEnum) => void;
Sort: string;
Source: any /*VT_DISPATCH*/;
State: number;
Status: number;
StayInSync: boolean;
Supports: (CursorOptions: CursorOptionEnum) => boolean;
Update: (Fields?: any, Values?: any) => void;
UpdateBatch: (AffectRecords?: AffectEnum) => void;
}
interface Stream {
Cancel: () => void;
Charset: string;
Close: () => void;
CopyTo: (DestStream: Stream, CharNumber?: number) => void;
EOS: boolean;
Flush: () => void;
LineSeparator: LineSeparatorEnum;
LoadFromFile: (FileName: string) => void;
Mode: ConnectModeEnum;
Open: (Source: any, Mode?: ConnectModeEnum, Options?: StreamOpenOptionsEnum, UserName?: string, Password?: string) => void;
Position: number;
Read: (NumBytes?: number) => any;
ReadText: (NumChars?: number) => string;
SaveToFile: (FileName: string, Options?: SaveOptionsEnum) => void;
SetEOS: () => void;
Size: number;
SkipLine: () => void;
State: ObjectStateEnum;
Type: StreamTypeEnum;
Write: (Buffer: any) => void;
WriteText: (Data: string, Options?: StreamWriteEnum) => void;
}
}
interface ActiveXObject {
new (progID: 'ADODB.Connection'): ADODB.Connection;
new (progID: 'ADODB.Record'): ADODB.Record;
new (progID: 'ADODB.Stream'): ADODB.Stream;
new (progID: 'ADODB.Command'): ADODB.Command;
new (progID: 'ADODB.Recordset'): ADODB.Recordset;
new (progID: 'ADODB.Parameter'): ADODB.Parameter;
}
-24
View File
@@ -1,24 +0,0 @@
{
"compilerOptions": {
"module": "commonjs",
"lib": [
"es6",
"dom",
"scripthost"
],
"noImplicitAny": true,
"noImplicitThis": true,
"strictNullChecks": false,
"baseUrl": "../",
"typeRoots": [
"../"
],
"types": [],
"noEmit": true,
"forceConsistentCasingInFileNames": true
},
"files": [
"index.d.ts",
"activex-data-objects-tests.ts"
]
}
@@ -1,64 +0,0 @@
//source -- https://msdn.microsoft.com/en-us/library/ebkhfaaz.aspx
//Generates a string describing the drive type of a given Drive object.
var showDriveType = (drive: Scripting.Drive) => {
switch (drive.DriveType) {
case Scripting.DriveTypeConst.Removable:
return 'Removeable';
case Scripting.DriveTypeConst.Fixed:
return 'Fixecd';
case Scripting.DriveTypeConst.Remote:
return 'Network';
case Scripting.DriveTypeConst.CDRom:
return 'CD-ROM';
case Scripting.DriveTypeConst.RamDisk:
return 'RAM Disk';
default:
return 'Unknown';
}
};
//Generates a string describing the attributes of a file or folder.
var showFileAttributes = (file: Scripting.File) => {
var attr = file.Attributes;
if (attr === 0) {
return 'Normal';
}
var attributeStrings: string[] = [];
if (attr & Scripting.FileAttribute.Directory) { attributeStrings.push('Directory'); }
if (attr & Scripting.FileAttribute.ReadOnly) { attributeStrings.push('Read-only'); }
if (attr & Scripting.FileAttribute.Hidden) { attributeStrings.push('Hidden'); }
if (attr & Scripting.FileAttribute.System) { attributeStrings.push('System'); }
if (attr & Scripting.FileAttribute.Volume) { attributeStrings.push('Volume'); }
if (attr & Scripting.FileAttribute.Archive) { attributeStrings.push('Archive'); }
if (attr & Scripting.FileAttribute.Alias) { attributeStrings.push('Alias'); }
if (attr & Scripting.FileAttribute.Compressed) { attributeStrings.push('Compressed'); }
return attributeStrings.join(',');
};
//source --https://msdn.microsoft.com/en-us/library/ts2t8ybh(v=vs.84).aspx
var showFreeSpace = (drvPath: string) => {
var fso = new ActiveXObject('Scripting.FileSystemObject');
var d = fso.GetDrive(fso.GetDriveName(drvPath));
var s = 'Drive ' + drvPath + ' - ';
s += d.VolumeName + '<br>';
s += 'Free Space: ' + d.FreeSpace / 1024 + ' Kbytes';
return (s);
};
//source -- https://msdn.microsoft.com/en-us/library/kaf6yaft(v=vs.84).aspx
var getALine = (filespec: string) => {
var fso = new ActiveXObject('Scripting.FileSystemObject');
var file = fso.OpenTextFile(filespec, Scripting.IOMode.ForReading, false);
var s = '';
while (!file.AtEndOfLine) {
s += file.Read(1);
}
file.Close();
return (s);
};
-205
View File
@@ -1,205 +0,0 @@
// Type definitions for Microsoft Scripting Runtime
// Project: https://msdn.microsoft.com/en-us/library/bstcxhf7.aspx
// Definitions by: Zev Spitz <https://github.com/zspitz>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
declare namespace Scripting {
//Enums
const enum CompareMethod {
BinaryCompare = 0,
DatabaseCompare = 2,
TextCompare = 1
}
const enum DriveTypeConst {
CDRom = 4,
Fixed = 2,
RamDisk = 5,
Remote = 3,
Removable = 1,
UnknownType = 0
}
const enum FileAttribute {
Alias = 1024,
Archive = 32,
Compressed = 2048,
Directory = 16,
Hidden = 2,
Normal = 0,
ReadOnly = 1,
System = 4,
Volume = 8
}
const enum IOMode {
ForAppending = 8,
ForReading = 1,
ForWriting = 2
}
const enum SpecialFolderConst {
SystemFolder = 1,
TemporaryFolder = 2,
WindowsFolder = 0
}
const enum StandardStreamTypes {
StdErr = 2,
StdIn = 0,
StdOut = 1
}
const enum Tristate {
TristateFalse = 0,
TristateMixed = -2,
TristateTrue = -1,
TristateUseDefault = -2
}
//Interfaces
interface Dictionary {
Add: (Key: any, Item: any) => void;
CompareMode: CompareMethod;
Count: number;
Exists: (Key: any) => boolean;
HashVal: (Key: any) => any;
Item: (Key: any) => any; //Also has setter with parameters
Items: () => any;
Key: (Key: any) => any;
Keys: () => any;
Remove: (Key: any) => void;
RemoveAll: () => void;
}
interface Drive {
AvailableSpace: any;
DriveLetter: string;
DriveType: DriveTypeConst;
FileSystem: string;
FreeSpace: any;
IsReady: boolean;
Path: string;
RootFolder: Folder;
SerialNumber: number;
ShareName: string;
TotalSize: any;
VolumeName: string;
}
interface Drives {
Count: number;
Item: (Key: any) => Drive;
}
interface Encoder {
EncodeScriptFile: (szExt: string, bstrStreamIn: string, cFlags: number, bstrDefaultLang: string) => string;
}
interface File {
Attributes: FileAttribute;
Copy: (Destination: string, OverWriteFiles?: boolean) => void;
DateCreated: VarDate;
DateLastAccessed: VarDate;
DateLastModified: VarDate;
Delete: (Force?: boolean) => void;
Drive: Drive;
Move: (Destination: string) => void;
Name: string;
OpenAsTextStream: (IOMode?: IOMode, Format?: Tristate) => TextStream;
ParentFolder: Folder;
Path: string;
ShortName: string;
ShortPath: string;
Size: any;
Type: string;
}
interface Files {
Count: number;
Item: (Key: any) => File;
}
interface FileSystemObject {
BuildPath: (Path: string, Name: string) => string;
CopyFile: (Source: string, Destination: string, OverWriteFiles?: boolean) => void;
CopyFolder: (Source: string, Destination: string, OverWriteFiles?: boolean) => void;
CreateFolder: (Path: string) => Folder;
CreateTextFile: (FileName: string, Overwrite?: boolean, Unicode?: boolean) => TextStream;
DeleteFile: (FileSpec: string, Force?: boolean) => void;
DeleteFolder: (FolderSpec: string, Force?: boolean) => void;
DriveExists: (DriveSpec: string) => boolean;
Drives: Drives;
FileExists: (FileSpec: string) => boolean;
FolderExists: (FolderSpec: string) => boolean;
GetAbsolutePathName: (Path: string) => string;
GetBaseName: (Path: string) => string;
GetDrive: (DriveSpec: string) => Drive;
GetDriveName: (Path: string) => string;
GetExtensionName: (Path: string) => string;
GetFile: (FilePath: string) => File;
GetFileName: (Path: string) => string;
GetFileVersion: (FileName: string) => string;
GetFolder: (FolderPath: string) => Folder;
GetParentFolderName: (Path: string) => string;
GetSpecialFolder: (SpecialFolder: SpecialFolderConst) => Folder;
GetStandardStream: (StandardStreamType: StandardStreamTypes, Unicode?: boolean) => TextStream;
GetTempName: () => string;
MoveFile: (Source: string, Destination: string) => void;
MoveFolder: (Source: string, Destination: string) => void;
OpenTextFile: (FileName: string, IOMode?: IOMode, Create?: boolean, Format?: Tristate) => TextStream;
}
interface Folder {
Attributes: FileAttribute;
Copy: (Destination: string, OverWriteFiles?: boolean) => void;
CreateTextFile: (FileName: string, Overwrite?: boolean, Unicode?: boolean) => TextStream;
DateCreated: VarDate;
DateLastAccessed: VarDate;
DateLastModified: VarDate;
Delete: (Force?: boolean) => void;
Drive: Drive;
Files: Files;
IsRootFolder: boolean;
Move: (Destination: string) => void;
Name: string;
ParentFolder: Folder;
Path: string;
ShortName: string;
ShortPath: string;
Size: any;
SubFolders: Folders;
Type: string;
}
interface Folders {
Add: (Name: string) => Folder;
Count: number;
Item: (Key: any) => Folder;
}
interface TextStream {
AtEndOfLine: boolean;
AtEndOfStream: boolean;
Close: () => void;
Column: number;
Line: number;
Read: (Characters: number) => string;
ReadAll: () => string;
ReadLine: () => string;
Skip: (Characters: number) => void;
SkipLine: () => void;
Write: (Text: string) => void;
WriteBlankLines: (Lines: number) => void;
WriteLine: (Text?: string) => void;
}
}
interface ActiveXObject {
new (progID: 'Scripting.Dictionary'): Scripting.Dictionary;
new (progID: 'Scripting.FileSystemObject'): Scripting.FileSystemObject;
new (progID: 'Scripting.Encoder'): Scripting.Encoder;
}
-24
View File
@@ -1,24 +0,0 @@
{
"compilerOptions": {
"module": "commonjs",
"lib": [
"es6",
"dom",
"scripthost"
],
"noImplicitAny": true,
"noImplicitThis": true,
"strictNullChecks": false,
"baseUrl": "../",
"typeRoots": [
"../"
],
"types": [],
"noEmit": true,
"forceConsistentCasingInFileNames": true
},
"files": [
"index.d.ts",
"activex-scripting-runtime-tests.ts"
]
}
@@ -1,71 +0,0 @@
//source -- https://msdn.microsoft.com/en-us/library/windows/desktop/ms630826(v=vs.85).aspx
//Convert a file
var commonDialog = new ActiveXObject('WIA.CommonDialog');
var img = commonDialog.ShowAcquireImage();
if (img.FormatID !== WIA.FormatID.wiaFormatJPEG) {
var ip = new ActiveXObject('WIA.ImageProcess');
ip.Filters.Add(ip.FilterInfos.Item('Convert').FilterID);
ip.Filters.Item(1).Properties.Item('FormatID').Value = WIA.FormatID.wiaFormatJPEG;
img = ip.Apply(img);
}
//Take a picture
var dev = commonDialog.ShowSelectDevice();
if (dev.Type === WIA.WiaDeviceType.CameraDeviceType) {
var itm = dev.ExecuteCommand(WIA.CommandID.wiaCommandTakePicture);
}
//Display detailed property information
dev = commonDialog.ShowSelectDevice();
var e = new Enumerator<WIA.Property>(dev.Properties); //no foreach over ActiveX collections
e.moveFirst();
while (!e.atEnd()) {
var p = e.item();
var s = p.Name + ' (' + p.PropertyID + ') = ';
if (p.IsVector) {
s += '[vector of data]';
} else {
s += p.Value;
if (p.SubType !== WIA.WiaSubType.UnspecifiedSubType) {
if (p.Value !== p.SubTypeDefault) {
s += ' (Default = ' + p.SubTypeDefault + ')';
}
}
}
if (p.IsReadOnly) {
s += ' [READ ONLY]';
} else {
switch (p.SubType) {
case WIA.WiaSubType.FlagSubType:
case WIA.WiaSubType.ListSubType:
if (p.SubType === WIA.WiaSubType.FlagSubType) {
s += ' [valid flags include: ';
} else {
s += ' [valid values include: ';
}
var count = p.SubTypeValues.Count;
for (var i = 1; i <= count; i++) {
s += p.SubTypeValues.Item(i);
if (i < count) {
s += ', ';
}
}
s += ']';
break;
case WIA.WiaSubType.RangeSubType:
s += ' [valid values in the range from ' + p.SubTypeMin + ' to ' + p.SubTypeMax + ' in increments of ' + p.SubTypeStep + ']';
break;
}
}
if (WScript) {
WScript.Echo(s);
} else if (window) {
window.alert(s);
}
}
-379
View File
@@ -1,379 +0,0 @@
// Type definitions for Microsoft Windows Image Acquisition Library v2.0
// Project: https://msdn.microsoft.com/en-us/library/windows/desktop/ms630827(v=vs.85).aspx
// Definitions by: Zev Spitz <https://github.com/zspitz>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
declare namespace WIA {
//Enums
type CommandID =
"'{04E725B0-ACAE-11D2-A093-00C04F72DC3C}'" //wiaCommandChangeDocument
| "'{E208C170-ACAD-11D2-A093-00C04F72DC3C}'" //wiaCommandDeleteAllItems
| "'{9B26B7B2-ACAD-11D2-A093-00C04F72DC3C}'" //wiaCommandSynchronize
| "'{AF933CAC-ACAD-11D2-A093-00C04F72DC3C}'" //wiaCommandTakePicture
| "'{1F3B3D8E-ACAE-11D2-A093-00C04F72DC3C}'"; //wiaCommandUnloadDocument
const CommandID: {
wiaCommandChangeDocument: CommandID,
wiaCommandDeleteAllItems: CommandID,
wiaCommandSynchronize: CommandID,
wiaCommandTakePicture: CommandID,
wiaCommandUnloadDocument: CommandID
};
type EventID =
"'{A28BBADE-64B6-11D2-A231-00C04FA31809}'" //wiaEventDeviceConnected
| "'{143E4E83-6497-11D2-A231-00C04FA31809}'" //wiaEventDeviceDisconnected
| "'{4C8F4EF5-E14F-11D2-B326-00C04F68CE61}'" //wiaEventItemCreated
| "'{1D22A559-E14F-11D2-B326-00C04F68CE61}'" //wiaEventItemDeleted
| "'{C686DCEE-54F2-419E-9A27-2FC7F2E98F9E}'" //wiaEventScanEmailImage
| "'{C00EB793-8C6E-11D2-977A-0000F87A926F}'" //wiaEventScanFaxImage
| "'{9B2B662C-6185-438C-B68B-E39EE25E71CB}'" //wiaEventScanFilmImage
| "'{A6C5A715-8C6E-11D2-977A-0000F87A926F}'" //wiaEventScanImage
| "'{FC4767C1-C8B3-48A2-9CFA-2E90CB3D3590}'" //wiaEventScanImage2
| "'{154E27BE-B617-4653-ACC5-0FD7BD4C65CE}'" //wiaEventScanImage3
| "'{A65B704A-7F3C-4447-A75D-8A26DFCA1FDF}'" //wiaEventScanImage4
| "'{9D095B89-37D6-4877-AFED-62A297DC6DBE}'" //wiaEventScanOCRImage
| "'{B441F425-8C6E-11D2-977A-0000F87A926F}'"; //wiaEventScanPrintImage
const EventID: {
wiaEventDeviceConnected: EventID,
wiaEventDeviceDisconnected: EventID,
wiaEventItemCreated: EventID,
wiaEventItemDeleted: EventID,
wiaEventScanEmailImage: EventID,
wiaEventScanFaxImage: EventID,
wiaEventScanFilmImage: EventID,
wiaEventScanImage: EventID,
wiaEventScanImage2: EventID,
wiaEventScanImage3: EventID,
wiaEventScanImage4: EventID,
wiaEventScanOCRImage: EventID,
wiaEventScanPrintImage: EventID
};
type FormatID =
"'{B96B3CAB-0728-11D3-9D7B-0000F81EF32E}'" //wiaFormatBMP
| "'{B96B3CB0-0728-11D3-9D7B-0000F81EF32E}'" //wiaFormatGIF
| "'{B96B3CAE-0728-11D3-9D7B-0000F81EF32E}'" //wiaFormatJPEG
| "'{B96B3CAF-0728-11D3-9D7B-0000F81EF32E}'" //wiaFormatPNG
| "'{B96B3CB1-0728-11D3-9D7B-0000F81EF32E}'"; //wiaFormatTIFF
const FormatID: {
wiaFormatBMP: FormatID,
wiaFormatGIF: FormatID,
wiaFormatJPEG: FormatID,
wiaFormatPNG: FormatID,
wiaFormatTIFF: FormatID
};
type Miscellaneous =
"'*'" //wiaAnyDeviceID
| "'{00000000-0000-0000-0000-000000000000}'"; //wiaIDUnknown
const Miscellaneous: {
wiaAnyDeviceID: Miscellaneous,
wiaIDUnknown: Miscellaneous
};
const enum WiaDeviceType {
CameraDeviceType = 2,
ScannerDeviceType = 1,
UnspecifiedDeviceType = 0,
VideoDeviceType = 3
}
const enum WiaEventFlag {
ActionEvent = 2,
NotificationEvent = 1
}
const enum WiaImageBias {
MaximizeQuality = 131072,
MinimizeSize = 65536
}
const enum WiaImageIntent {
ColorIntent = 1,
GrayscaleIntent = 2,
TextIntent = 4,
UnspecifiedIntent = 0
}
const enum WiaImagePropertyType {
ByteImagePropertyType = 1001,
LongImagePropertyType = 1004,
RationalImagePropertyType = 1006,
StringImagePropertyType = 1002,
UndefinedImagePropertyType = 1000,
UnsignedIntegerImagePropertyType = 1003,
UnsignedLongImagePropertyType = 1005,
UnsignedRationalImagePropertyType = 1007,
VectorOfBytesImagePropertyType = 1101,
VectorOfLongsImagePropertyType = 1103,
VectorOfRationalsImagePropertyType = 1105,
VectorOfUndefinedImagePropertyType = 1100,
VectorOfUnsignedIntegersImagePropertyType = 1102,
VectorOfUnsignedLongsImagePropertyType = 1104,
VectorOfUnsignedRationalsImagePropertyType = 1106
}
const enum WiaItemFlag {
AnalyzeItemFlag = 16,
AudioItemFlag = 32,
BurstItemFlag = 2048,
DeletedItemFlag = 128,
DeviceItemFlag = 64,
DisconnectedItemFlag = 256,
FileItemFlag = 2,
FolderItemFlag = 4,
FreeItemFlag = 0,
GeneratedItemFlag = 16384,
HasAttachmentsItemFlag = 32768,
HPanoramaItemFlag = 512,
ImageItemFlag = 1,
RemovedItemFlag = -2147483648,
RootItemFlag = 8,
StorageItemFlag = 4096,
TransferItemFlag = 8192,
VideoItemFlag = 65536,
VPanoramaItemFlag = 1024
}
const enum WiaPropertyType {
BooleanPropertyType = 1,
BytePropertyType = 2,
ClassIDPropertyType = 15,
CurrencyPropertyType = 12,
DatePropertyType = 13,
DoublePropertyType = 11,
ErrorCodePropertyType = 7,
FileTimePropertyType = 14,
HandlePropertyType = 18,
IntegerPropertyType = 3,
LargeIntegerPropertyType = 8,
LongPropertyType = 5,
ObjectPropertyType = 17,
SinglePropertyType = 10,
StringPropertyType = 16,
UnsignedIntegerPropertyType = 4,
UnsignedLargeIntegerPropertyType = 9,
UnsignedLongPropertyType = 6,
UnsupportedPropertyType = 0,
VariantPropertyType = 19,
VectorOfBooleansPropertyType = 101,
VectorOfBytesPropertyType = 102,
VectorOfClassIDsPropertyType = 115,
VectorOfCurrenciesPropertyType = 112,
VectorOfDatesPropertyType = 113,
VectorOfDoublesPropertyType = 111,
VectorOfErrorCodesPropertyType = 107,
VectorOfFileTimesPropertyType = 114,
VectorOfIntegersPropertyType = 103,
VectorOfLargeIntegersPropertyType = 108,
VectorOfLongsPropertyType = 105,
VectorOfSinglesPropertyType = 110,
VectorOfStringsPropertyType = 116,
VectorOfUnsignedIntegersPropertyType = 104,
VectorOfUnsignedLargeIntegersPropertyType = 109,
VectorOfUnsignedLongsPropertyType = 106,
VectorOfVariantsPropertyType = 119
}
const enum WiaSubType {
FlagSubType = 3,
ListSubType = 2,
RangeSubType = 1,
UnspecifiedSubType = 0
}
//Interfaces
interface CommonDialog {
ShowAcquireImage: (DeviceType?: WiaDeviceType, Intent?: WiaImageIntent, Bias?: WiaImageBias, FormatID?: string, AlwaysSelectDevice?: boolean, UseCommonUI?: boolean, CancelError?: boolean) => ImageFile;
ShowAcquisitionWizard: (Device: Device) => any;
ShowDeviceProperties: (Device: Device, CancelError?: boolean) => void;
ShowItemProperties: (Item: Item, CancelError?: boolean) => void;
ShowPhotoPrintingWizard: (Files: any) => void;
ShowSelectDevice: (DeviceType?: WiaDeviceType, AlwaysSelectDevice?: boolean, CancelError?: boolean) => Device;
ShowSelectItems: (Device: Device, Intent?: WiaImageIntent, Bias?: WiaImageBias, SingleSelect?: boolean, UseCommonUI?: boolean, CancelError?: boolean) => Items;
ShowTransfer: (Item: Item, FormatID?: string, CancelError?: boolean) => any;
}
interface Device {
Commands: DeviceCommands;
DeviceID: string;
Events: DeviceEvents;
ExecuteCommand: (CommandID: string) => Item;
GetItem: (ItemID: string) => Item;
Items: Items;
Properties: Properties;
Type: WiaDeviceType;
WiaItem: any /*VT_UNKNOWN*/;
}
interface DeviceCommand {
CommandID: string;
Description: string;
Name: string;
}
interface DeviceCommands {
Count: number;
Item: (Index: number) => DeviceCommand;
}
interface DeviceEvent {
Description: string;
EventID: string;
Name: string;
Type: WiaEventFlag;
}
interface DeviceEvents {
Count: number;
Item: (Index: number) => DeviceEvent;
}
interface DeviceInfo {
Connect: () => Device;
DeviceID: string;
Properties: Properties;
Type: WiaDeviceType;
}
interface DeviceInfos {
Count: number;
Item: (Index: any) => DeviceInfo;
}
interface DeviceManager {
DeviceInfos: DeviceInfos;
RegisterEvent: (EventID: string, DeviceID?: string) => void;
RegisterPersistentEvent: (Command: string, Name: string, Description: string, Icon: string, EventID: string, DeviceID?: string) => void;
UnregisterEvent: (EventID: string, DeviceID?: string) => void;
UnregisterPersistentEvent: (Command: string, Name: string, Description: string, Icon: string, EventID: string, DeviceID?: string) => void;
}
interface Filter {
Description: string;
FilterID: string;
Name: string;
Properties: Properties;
}
interface FilterInfo {
Description: string;
FilterID: string;
Name: string;
}
interface FilterInfos {
Count: number;
Item: (Index: any) => FilterInfo;
}
interface Filters {
Add: (FilterID: string, Index?: number) => void;
Count: number;
Item: (Index: number) => Filter;
Remove: (Index: number) => void;
}
interface Formats {
Count: number;
Item: (Index: number) => string;
}
interface ImageFile {
ActiveFrame: number;
ARGBData: Vector;
FileData: Vector;
FileExtension: string;
FormatID: string;
FrameCount: number;
Height: number;
HorizontalResolution: number;
IsAlphaPixelFormat: boolean;
IsAnimated: boolean;
IsExtendedPixelFormat: boolean;
IsIndexedPixelFormat: boolean;
LoadFile: (Filename: string) => void;
PixelDepth: number;
Properties: Properties;
SaveFile: (Filename: string) => void;
VerticalResolution: number;
Width: number;
}
interface ImageProcess {
Apply: (Source: ImageFile) => ImageFile;
FilterInfos: FilterInfos;
Filters: Filters;
}
interface Item {
Commands: DeviceCommands;
ExecuteCommand: (CommandID: string) => Item;
Formats: Formats;
ItemID: string;
Items: Items;
Properties: Properties;
Transfer: (FormatID?: string) => any;
WiaItem: any /*VT_UNKNOWN*/;
}
interface Items {
Add: (Name: string, Flags: number) => void;
Count: number;
Item: (Index: number) => Item;
Remove: (Index: number) => void;
}
interface Properties {
Count: number;
Exists: (Index: any) => boolean;
Item: (Index: any) => Property;
}
interface Property {
IsReadOnly: boolean;
IsVector: boolean;
Name: string;
PropertyID: number;
SubType: WiaSubType;
SubTypeDefault: any;
SubTypeMax: number;
SubTypeMin: number;
SubTypeStep: number;
SubTypeValues: Vector;
Type: number;
Value: any;
}
interface Rational {
Denominator: number;
Numerator: number;
Value: number;
}
interface Vector {
Add: (Value: any, Index?: number) => void;
BinaryData: any;
Clear: () => void;
Count: number;
Date: VarDate;
ImageFile: (Width?: number, Height?: number) => ImageFile;
Item: (Index: number) => any; //Also has setter with parameters
Picture: (Width?: number, Height?: number) => any;
Remove: (Index: number) => any;
SetFromString: (Value: string, Resizable?: boolean, Unicode?: boolean) => void;
String: (Unicode?: boolean) => string;
}
}
interface ActiveXObject {
new (progID: 'WIA.Rational'): WIA.Rational;
new (progID: 'WIA.Vector'): WIA.Vector;
new (progID: 'WIA.ImageFile'): WIA.ImageFile;
new (progID: 'WIA.ImageProcess'): WIA.ImageProcess;
new (progID: 'WIA.CommonDialog'): WIA.CommonDialog;
new (progID: 'WIA.DeviceManager'): WIA.DeviceManager;
}
@@ -1,24 +0,0 @@
{
"compilerOptions": {
"module": "commonjs",
"lib": [
"es6",
"dom",
"scripthost"
],
"noImplicitAny": true,
"noImplicitThis": true,
"strictNullChecks": false,
"baseUrl": "../",
"typeRoots": [
"../"
],
"types": [],
"noEmit": true,
"forceConsistentCasingInFileNames": true
},
"files": [
"index.d.ts",
"activex-windows-image-acquisition-tests.ts"
]
}
-174
View File
@@ -1,174 +0,0 @@
// Type definitions for ADAL.JS 1.0.13
// Project: https://github.com/AzureAD/azure-activedirectory-library-for-js
// Definitions by: mmaitre314 <https://github.com/mmaitre314>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
declare var AuthenticationContext: adal.AuthenticationContextStatic;
declare var Logging: adal.Logging;
declare module 'adal' {
export = { AuthenticationContext, Logging };
}
declare namespace adal {
interface Config {
tenant?: string;
clientId: string;
redirectUri?: string;
instance?: string;
endpoints?: any; // If you need to send CORS api requests.
popUp?: boolean;
localLoginUrl?: string;
displayCall?: (urlNavigate: string) => any;
postLogoutRedirectUri?: string; // redirect url after succesful logout operation
cacheLocation?: string;
anonymousEndpoints?: string[];
expireOffsetSeconds?: number;
correlationId?: string;
loginResource?: string;
resource?: string;
extraQueryParameter?: string;
}
interface User {
userName: string;
profile: any;
}
interface RequestInfo {
valid: boolean;
parameters: any;
stateMatch: boolean;
stateResponse: string;
requestType: string;
}
interface Logging {
log: (message: string) => void;
level: LoggingLevel;
}
enum LoggingLevel {
ERROR = 0,
WARNING = 1,
INFO = 2,
VERBOSE = 3
}
interface AuthenticationContextStatic {
new (config: Config): AuthenticationContext;
}
interface AuthenticationContext {
instance: string;
config: Config;
/**
* Gets initial Idtoken for the app backend
* Saves the resulting Idtoken in localStorage.
*/
login(): void;
/**
* Indicates whether login is in progress now or not.
*/
loginInProgress(): boolean;
/**
* Gets token for the specified resource from local storage cache
* @param {string} resource A URI that identifies the resource for which the token is valid.
* @returns {string} token if exists and not expired or null
*/
getCachedToken(resource: string): string;
/**
* Retrieves and parse idToken from localstorage
* @returns {User} user object
*/
getCachedUser(): User;
registerCallback(expectedState: string, resource: string, callback: (message: string, token: string) => any): void;
/**
* Acquire token from cache if not expired and available. Acquires token from iframe if expired.
* @param {string} resource ResourceUri identifying the target resource
* @param {requestCallback} callback
*/
acquireToken(resource: string, callback: (message: string, token: string) => any): void;
/**
* Redirect the Browser to Azure AD Authorization endpoint
* @param {string} urlNavigate The authorization request url
*/
promptUser(urlNavigate: string): void;
/**
* Clear cache items.
*/
clearCache(): void;
/**
* Clear cache items for a resource.
*/
clearCacheForResource(resource: string): void;
/**
* Logout user will redirect page to logout endpoint.
* After logout, it will redirect to post_logout page if provided.
*/
logOut(): void;
/**
* Gets a user profile
* @param {requestCallback} callback - The callback that handles the response.
*/
getUser(callback: (message: string, user?: User) => any): void;
/**
* Checks if hash contains access token or id token or error_description
* @param {string} hash - Hash passed from redirect page
* @returns {Boolean}
*/
isCallback(hash: string): boolean;
/**
* Gets login error
* @returns {string} error message related to login
*/
getLoginError(): string;
/**
* Gets requestInfo from given hash.
* @returns {RequestInfo} for appropriate hash.
*/
getRequestInfo(hash: string): RequestInfo;
/**
* Saves token from hash that is received from redirect.
*/
saveTokenFromHash(requestInfo: RequestInfo): void;
/**
* Gets resource for given endpoint if mapping is provided with config.
* @param {string} endpoint - API endpoint
* @returns {string} resource for this API endpoint
*/
getResourceForEndpoint(endpoint: string): string;
/**
* Handles redirection after login operation.
* Gets access token from url and saves token to the (local/session) storage
* or saves error in case unsuccessful login.
*/
handleWindowCallback(): void;
log(level: number, message: string, error: any): void;
error(message: string, error: any): void;
warn(message: string): void;
info(message: string): void;
verbose(message: string): void;
}
}
-25
View File
@@ -1,25 +0,0 @@
{
"compilerOptions": {
"module": "commonjs",
"lib": [
"es6",
"dom"
],
"noImplicitAny": true,
"noImplicitThis": true,
"strictNullChecks": false,
"baseUrl": "../",
"typeRoots": [
"../"
],
"types": [],
"noEmit": true,
"forceConsistentCasingInFileNames": true
},
"files": [
"index.d.ts",
"adal-angular.d.ts",
"test/index.ts",
"test/angular.ts"
]
}
-22
View File
@@ -1,22 +0,0 @@
{
"compilerOptions": {
"module": "commonjs",
"lib": [
"es6"
],
"noImplicitAny": true,
"noImplicitThis": true,
"strictNullChecks": false,
"baseUrl": "../",
"typeRoots": [
"../"
],
"types": [],
"noEmit": true,
"forceConsistentCasingInFileNames": true
},
"files": [
"index.d.ts",
"add2home-tests.ts"
]
}
-22
View File
@@ -1,22 +0,0 @@
{
"compilerOptions": {
"module": "commonjs",
"lib": [
"es6"
],
"noImplicitAny": true,
"noImplicitThis": true,
"strictNullChecks": false,
"baseUrl": "../",
"typeRoots": [
"../"
],
"types": [],
"noEmit": true,
"forceConsistentCasingInFileNames": true
},
"files": [
"index.d.ts",
"adm-zip-tests.ts"
]
}
-136
View File
@@ -1,136 +0,0 @@
checkGridOptions(<ag.grid.GridOptions>{});
checkColDef(<ag.grid.ColDef>{});
function checkGridOptions(gridOptions: ag.grid.GridOptions): void {
gridOptions.virtualPaging = true;
gridOptions.toolPanelSuppressPivot = true;
gridOptions.toolPanelSuppressValues = true;
gridOptions.rowsAlreadyGrouped = true;
gridOptions.suppressRowClickSelection = true;
gridOptions.suppressCellSelection = true;
gridOptions.sortingOrder = ['asc','desc'];
gridOptions.suppressMultiSort = true;
gridOptions.suppressHorizontalScroll = true;
gridOptions.unSortIcon = true;
gridOptions.rowHeight = 0;
gridOptions.rowBuffer = 0;
gridOptions.enableColResize = true;
gridOptions.enableCellExpressions = true;
gridOptions.enableSorting = true;
gridOptions.enableServerSideSorting = true;
gridOptions.enableFilter = true;
gridOptions.enableServerSideFilter = true;
gridOptions.colWidth = 0;
gridOptions.suppressMenuHide = true;
gridOptions.singleClickEdit = true;
gridOptions.debug = true;
gridOptions.icons = {};
gridOptions.angularCompileRows = true;
gridOptions.angularCompileFilters = true;
gridOptions.angularCompileHeaders = true;
gridOptions.localeText = {};
gridOptions.localeTextFunc = function() {}
gridOptions.suppressScrollLag = true;
gridOptions.groupSuppressAutoColumn = true;
gridOptions.groupSelectsChildren = true;
gridOptions.groupHidePivotColumns = true;
gridOptions.groupIncludeFooter = true;
gridOptions.groupUseEntireRow = true;
gridOptions.groupSuppressRow = true;
gridOptions.groupSuppressBlankHeader = true;
gridOptions.forPrint = true;
gridOptions.groupColumnDef = {};
gridOptions.context = {};
gridOptions.rowStyle = {color: 'red'};
gridOptions.rowClass = 'green';
gridOptions.groupDefaultExpanded = false;
gridOptions.slaveGrids = [];
gridOptions.rowSelection = 'single';
gridOptions.rowDeselection = true;
gridOptions.rowData = [];
gridOptions.floatingTopRowData = [];
gridOptions.floatingBottomRowData = [];
gridOptions.showToolPanel = true;
gridOptions.groupKeys = ['a','b']
gridOptions.groupAggFields = ['a','b']
gridOptions.columnDefs = [];
gridOptions.datasource = {};
gridOptions.pinnedColumnCount = 0;
gridOptions.groupHeaders = true;
gridOptions.headerHeight = 0;
gridOptions.groupRowInnerRenderer = function(params) {};
gridOptions.groupRowRenderer = {};
gridOptions.isScrollLag = function() {return true;}
gridOptions.isExternalFilterPresent = function() { return true; };
gridOptions.doesExternalFilterPass = function(node: ag.grid.RowNode) { return false; };
gridOptions.getRowStyle = function() {};
gridOptions.getRowClass = function() {};
gridOptions.headerCellRenderer = function() {};
gridOptions.groupAggFunction = function(nodes: any[]) {};
gridOptions.onReady = function(api: any) {};
gridOptions.onModelUpdated = function() {};
gridOptions.onCellClicked = function(params) {};
gridOptions.onCellDoubleClicked = function(params) {};
gridOptions.onCellContextMenu = function(params) {};
gridOptions.onCellValueChanged = function(params) {};
gridOptions.onCellFocused = function(params) {};
gridOptions.onRowSelected = function(params) {};
gridOptions.onSelectionChanged = function() {};
gridOptions.onBeforeFilterChanged = function() {};
gridOptions.onAfterFilterChanged = function() {};
gridOptions.onFilterModified = function() {};
gridOptions.onBeforeSortChanged = function() {};
gridOptions.onAfterSortChanged = function() {};
gridOptions.onVirtualRowRemoved = function(params) {};
gridOptions.onRowClicked = function(params) {};
gridOptions.api = null;
gridOptions.columnApi = null;
}
function checkColDef(colDef: ag.grid.ColDef): void {
colDef.sort = 'test';
colDef.sortedAt = 0;
colDef.sortingOrder = ['asc','desc'];
colDef.headerName = 'test';
colDef.field = 'test';
colDef.headerValueGetter = 'test';
colDef.colId = 'test';
colDef.hide = true;
colDef.headerTooltip = 'test';
colDef.valueGetter = 'test';
colDef.headerCellRenderer = {};
colDef.headerClass = 'test';
colDef.width = 0;
colDef.minWidth = 0;
colDef.maxWidth = 0;
colDef.cellClass = 'test';
colDef.cellStyle = {color: 'test'};
colDef.cellRenderer = function() {};
colDef.floatingCellRenderer = function() {};
colDef.aggFunc = 'test';
colDef.comparator = function() {};
colDef.checkboxSelection = true;
colDef.suppressMenu = true;
colDef.suppressSorting = true;
colDef.unSortIcon = true;
colDef.suppressSizeToFit = true;
colDef.suppressResize = true;
colDef.headerGroup = 'test';
colDef.headerGroupShow = 'test';
colDef.editable = true;
colDef.newValueHandler = function() {};
colDef.volatile = true;
colDef.template = 'test';
colDef.templateUrl = 'test';
colDef.filter = 'test';
colDef.filterParams = {};
colDef.onCellValueChanged = function() {};
colDef.onCellClicked = function() {};
colDef.onCellDoubleClicked = function() {};
colDef.onCellContextMenu = function() {};
colDef.cellClassRules = {};
}
-1991
View File
File diff suppressed because it is too large Load Diff
-23
View File
@@ -1,23 +0,0 @@
{
"files": [
"index.d.ts",
"ag-grid-tests.ts"
],
"compilerOptions": {
"module": "commonjs",
"lib": [
"es6",
"dom"
],
"noImplicitAny": true,
"noImplicitThis": true,
"strictNullChecks": false,
"baseUrl": "../",
"typeRoots": [
"../"
],
"types": [],
"noEmit": true,
"forceConsistentCasingInFileNames": true
}
}
-448
View File
@@ -1,448 +0,0 @@
// Type definitions for Agenda v0.8.9
// Project: https://github.com/rschmukler/agenda
// Definitions by: Meir Gottlieb <https://github.com/meirgottlieb>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
/// <reference types="node" />
import { EventEmitter } from "events";
import { Db, Collection, ObjectID } from "mongodb";
export = Agenda;
interface Callback {
(err?: Error): void;
}
interface ResultCallback<T> {
(err?: Error, result?: T): void;
}
declare class Agenda extends EventEmitter {
/**
* Constructs a new Agenda object.
* @param config Optional configuration to initialize the Agenda.
* @param cb Optional callback called with the MongoDB colleciton.
*/
constructor(config?: Agenda.AgendaConfiguration, cb?: ResultCallback<Collection>);
/**
* Connect to the specified MongoDB server and database.
*/
database(url: string, collection?: string, options?: any, cb?: ResultCallback<Collection>): Agenda;
/**
* Initialize agenda with an existing MongoDB connection.
*/
mongo(db: Db, collection?: string, cb?: ResultCallback<Collection>): Agenda;
/**
* Sets the agenda name.
*/
name(value: string): Agenda;
/**
* Sets the interval with which the queue is checked. A number in milliseconds or a frequency string.
*/
processEvery(interval: string | number): Agenda;
/**
* Takes a number which specifies the max number of jobs that can be running at any given moment. By default it
* is 20.
* @param value The value to set.
*/
maxConcurrency(value: number): Agenda;
/**
* Takes a number which specifies the default number of a specific job that can be running at any given moment.
* By default it is 5.
* @param value The value to set.
*/
defaultConcurrency(value: number): Agenda;
/**
* Takes a number shich specifies the max number jobs that can be locked at any given moment. By default it is
* 0 for no max.
* @param value The value to set.
*/
lockLimit(value: number): Agenda;
/**
* Takes a number which specifies the default number of a specific job that can be locked at any given moment.
* By default it is 0 for no max.
* @param value The value to set.
*/
defaultLockLimit(value: number): Agenda;
/**
* Takes a number which specifies the default lock lifetime in milliseconds. By default it is 10 minutes. This
* can be overridden by specifying the lockLifetime option to a defined job.
* @param value The value to set.
*/
defaultLockLifetime(value: number): Agenda;
/**
* Returns an instance of a jobName with data. This does NOT save the job in the database. See below to learn
* how to manually work with jobs.
* @param name The name of the job.
* @param data Data to associated with the job.
*/
create(name: string, data?: any): Agenda.Job;
/**
* Find all Jobs matching `query` and pass same back in cb().
* @param query
* @param cb
*/
jobs(query: any, cb: ResultCallback<Agenda.Job[]>): void;
/**
* Removes all jobs in the database without defined behaviors. Useful if you change a definition name and want
* to remove old jobs.
* @param cb Called with the number of jobs removed.
*/
purge(cb?: ResultCallback<number>): void;
/**
* Defines a job with the name of jobName. When a job of job name gets run, it will be passed to fn(job, done).
* To maintain asynchronous behavior, you must call done() when you are processing the job. If your function is
* synchronous, you may omit done from the signature.
* @param name The name of the jobs.
* @param options The options for the job.
* @param handler The handler to execute.
*/
define(name: string, handler: (job?: Agenda.Job, done?: (err?: Error) => void) => void): void;
define(name: string, options: Agenda.JobOptions, handler: (job?: Agenda.Job, done?: (err?: Error) => void) => void): void;
/**
* Runs job name at the given interval. Optionally, data and options can be passed in.
* @param interval Can be a human-readable format String, a cron format String, or a Number.
* @param names The name or names of the job(s) to run.
* @param data An optional argument that will be passed to the processing function under job.attrs.data.
* @param options An optional argument that will be passed to job.repeatEvery.
* @param cb An optional callback function which will be called when the job has been persisted in the database.
*/
every(interval: number | string, names: string, data?: any, options?: any, cb?: ResultCallback<Agenda.Job>): Agenda.Job;
every(interval: number | string, names: string[], data?: any, options?: any, cb?: ResultCallback<Agenda.Job[]>): Agenda.Job[];
/**
* Schedules a job to run name once at a given time.
* @param when A Date or a String such as tomorrow at 5pm.
* @param names The name or names of the job(s) to run.
* @param data An optional argument that will be passed to the processing function under job.attrs.data.
* @param cb An optional callback function which will be called when the job has been persisted in the database.
*/
schedule(when: Date | string, names: string, data?: any, cb?: ResultCallback<Agenda.Job>): Agenda.Job;
schedule(when: Date | string, names: string[], data?: any, cb?: ResultCallback<Agenda.Job[]>): Agenda.Job[];
/**
* Schedules a job to run name once immediately.
* @param name The name of the job to run.
* @param data An optional argument that will be passed to the processing function under job.attrs.data.
* @param cb An optional callback function which will be called when the job has been persisted in the database.
*/
now(name: string, data?: any, cb?: ResultCallback<Agenda.Job>): Agenda.Job;
/**
* Cancels any jobs matching the passed mongodb-native query, and removes them from the database.
* @param query Mongodb native query.
* @param cb Called with the number of jobs removed.
*/
cancel(query: any, cb?: ResultCallback<number>): void;
/**
* Starts the job queue processing, checking processEvery time to see if there are new jobs.
*/
start(): void;
/**
* Stops the job queue processing. Unlocks currently running jobs.
* @param cb Called after the job processing queue shuts down and unlocks all jobs.
*/
stop(cb: Callback): void;
}
declare namespace Agenda {
/**
* Agenda Configuration.
*/
interface AgendaConfiguration {
/**
* Sets the interval with which the queue is checked. A number in milliseconds or a frequency string.
*/
processEvery?: string | number;
/**
* Takes a number which specifies the default number of a specific job that can be running at any given moment.
* By default it is 5.
*/
defaultConcurrency?: number;
/**
* Takes a number which specifies the max number of jobs that can be running at any given moment. By default it
* is 20.
*/
maxConcurrency?: number;
/**
* Takes a number which specifies the default number of a specific job that can be locked at any given moment.
* By default it is 0 for no max.
*/
defaultLockLimit?: number;
/**
* Takes a number shich specifies the max number jobs that can be locked at any given moment. By default it is
* 0 for no max.
*/
lockLimit?: number;
/**
* Takes a number which specifies the default lock lifetime in milliseconds. By default it is 10 minutes. This
* can be overridden by specifying the lockLifetime option to a defined job.
*/
defaultLockLifetime?: number;
/**
* Specifies that Agenda should be initialized using and existing MongoDB connection.
*/
mongo?: {
/**
* The MongoDB database connection to use.
*/
db: Db;
/**
* The name of the collection to use.
*/
collection?: string;
}
/**
* Specifies that Agenda should connect to MongoDB.
*/
db?: {
/**
* The connection URL.
*/
address: string;
/**
* The name of the collection to use.
*/
collection?: string;
/**
* Connection options to pass to MongoDB.
*/
options?: any;
}
}
/**
* The database record associated with a job.
*/
interface JobAttributes {
/**
* The record identity.
*/
_id: ObjectID;
/**
* The name of the job.
*/
name: string;
/**
* The type of the job (single|normal).
*/
type: string;
/**
* The job details.
*/
data: { [name: string]: any };
/**
* The priority of the job.
*/
priority: number;
/**
* How often the job is repeated using a human-readable or cron format.
*/
repeatInterval: string | number;
/**
* The timezone that conforms to [moment-timezone](http://momentjs.com/timezone/).
*/
repeatTimezone: string;
/**
* Date/time the job was las modified.
*/
lastModifiedBy: string;
/**
* Date/time the job will run next.
*/
nextRunAt: Date;
/**
* Date/time the job was locked.
*/
lockedAt: Date;
/**
* Date/time the job was last run.
*/
lastRunAt: Date;
/**
* Date/time the job last finished running.
*/
lastFinishedAt: Date;
/**
* The reason the job failed.
*/
failReason: string;
/**
* The number of times the job has failed.
*/
failCount: number;
/**
* The date/time the job last failed.
*/
failedAt: Date;
/**
* Job's state
*/
disabled: boolean
}
/**
* A scheduled job.
*/
interface Job {
/**
* The database record associated with the job.
*/
attrs: JobAttributes;
/**
* Specifies an interval on which the job should repeat.
* @param interval A human-readable format String, a cron format String, or a Number.
* @param options An optional argument that can include a timezone field. The timezone should be a string as
* accepted by moment-timezone and is considered when using an interval in the cron string format.
*/
repeatEvery(interval: string | number, options?: { timezone?: string }): Job
/**
* Specifies a time when the job should repeat. [Possible values](https://github.com/matthewmueller/date#examples).
* @param time
*/
repeatAt(time: string): Job
/**
* Disables the job.
*/
disable(): Job;
/**
* Enables the job.
*/
enable(): Job;
/**
* Ensure that only one instance of this job exists with the specified properties
* @param value The properties associated with the job that must be unqiue.
* @param opts
*/
unique(value: any, opts?: { insertOnly?: boolean }): Job;
/**
* Specifies the next time at which the job should run.
* @param time The next time at which the job should run.
*/
schedule(time: string | Date): Job;
/**
* Specifies the priority weighting of the job.
* @param value The priority of the job (lowest|low|normal|high|highest|number).
*/
priority(value: string | number): Job;
/**
* Sets job.attrs.failedAt to now, and sets job.attrs.failReason to reason.
* @param reason A message or Error object that indicates why the job failed.
*/
fail(reason: string | Error): Job;
/**
* Runs the given job and calls callback(err, job) upon completion. Normally you never need to call this manually
* @param cb Called when the job is completed.
*/
run(cb?: ResultCallback<Job>): Job;
/**
* Returns true if the job is running; otherwise, returns false.
*/
isRunning(): boolean;
/**
* Saves the job into the database.
* @param cb Called when the job is saved.
*/
save(cb?: ResultCallback<Job>): Job;
/**
* Removes the job from the database and cancels the job.
* @param cb Called after the job has beeb removed from the database.
*/
remove(cb?: Callback): void;
/**
* Resets the lock on the job. Useful to indicate that the job hasn't timed out when you have very long running
* jobs.
* @param cb Called after the job has been saved to the database.
*/
touch(cb?: Callback): void;
/**
* Calculates next time the job should run
*/
computeNextRunAt(): Job;
}
interface JobOptions {
/**
* Maximum number of that job that can be running at once (per instance of agenda)
*/
concurrency?: number;
/**
* Maximum number of that job that can be locked at once (per instance of agenda)
*/
lockLimit?: number;
/**
* Interval in ms of how long the job stays locked for (see multiple job processors for more info). A job will
* automatically unlock if done() is called.
*/
lockLifetime?: number;
/**
* (lowest|low|normal|high|highest|number) specifies the priority of the job. Higher priority jobs will run
* first.
*/
priority?: string | number;
}
}
-22
View File
@@ -1,22 +0,0 @@
{
"compilerOptions": {
"module": "commonjs",
"lib": [
"es6"
],
"noImplicitAny": true,
"noImplicitThis": true,
"strictNullChecks": false,
"baseUrl": "../",
"typeRoots": [
"../"
],
"types": [],
"noEmit": true,
"forceConsistentCasingInFileNames": true
},
"files": [
"index.d.ts",
"agenda-tests.ts"
]
}
-124
View File
@@ -1,124 +0,0 @@
// Type definitions for alertify 0.3.11
// Project: http://fabien-d.github.io/alertify.js/
// Definitions by: John Jeffery <http://github.com/jjeffery>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
declare var alertify: alertify.IAlertifyStatic;
declare namespace alertify {
interface IAlertifyStatic {
/**
* Create an alert dialog box
* @param message The message passed from the callee
* @param fn Callback function
* @param cssClass Class(es) to append to dialog box
* @return alertify (ie this)
* @since 0.0.1
*/
alert(message: string, fn?: Function, cssClass?: string): IAlertifyStatic;
/**
* Create a confirm dialog box
* @param message The message passed from the callee
* @param fn Callback function
* @param cssClass Class(es) to append to dialog box
* @return alertify (ie this)
* @since 0.0.1
*/
confirm(message: string, fn?: Function, cssClass?: string): IAlertifyStatic;
/**
* Extend the log method to create custom methods
* @param type Custom method name
* @return function for logging
* @since 0.0.1
*/
extend(type: string): (message: string, wait?: number) => IAlertifyStatic;
/**
* Initialize Alertify and create the 2 main elements.
* Initialization will happen automatically on the first
* use of alert, confirm, prompt or log.
* @since 0.0.1
*/
init(): void;
/**
* Show a new log message box
* @param message The message passed from the callee
* @param type Optional type of log message
* @param wait Optional time (in ms) to wait before auto-hiding
* @return alertify (ie this)
* @since 0.0.1
*/
log(message: string, type?: string, wait?: number): IAlertifyStatic;
/**
* Create a prompt dialog box
* @param message The message passed from the callee
* @param fn Callback function
* @param placeholder Default value for prompt input
* @param cssClass Class(es) to append to dialog
* @return alertify (ie this)
* @since 0.0.1
*/
prompt(message: string, fn?: Function, placeholder?: string, cssClass?: string): IAlertifyStatic;
/**
* Shorthand for log messages
* @param message The message passed from the callee
* @return alertify (ie this)
* @since 0.0.1
*/
success(message: string): IAlertifyStatic;
/**
* Shorthand for log messages
* @param message The message passed from the callee
* @return alertify (ie this)
* @since 0.0.1
*/
error(message: string): IAlertifyStatic;
/**
* Used to set alertify properties
* @param Properties
* @since 0.2.11
*/
set(args: IProperties): void;
/**
* The labels used for dialog buttons
*/
labels: ILabels;
/**
* Attaches alertify.error to window.onerror method
* @since 0.3.8
*/
debug(): void;
}
/**
* Properties for alertify.set function
*/
interface IProperties {
/** Default value for milliseconds display of log messages */
delay?: number;
/** Default values for display of labels */
labels?: ILabels;
/** Default button for focus */
buttonFocus?: string;
/** Should buttons be displayed in reverse order */
buttonReverse?: boolean;
}
/** Labels for altertify.set function */
interface ILabels {
ok?: string;
cancel?: string;
}
}
-23
View File
@@ -1,23 +0,0 @@
{
"compilerOptions": {
"module": "commonjs",
"lib": [
"es6",
"dom"
],
"noImplicitAny": true,
"noImplicitThis": true,
"strictNullChecks": false,
"baseUrl": "../",
"typeRoots": [
"../"
],
"types": [],
"noEmit": true,
"forceConsistentCasingInFileNames": true
},
"files": [
"index.d.ts",
"alertify-tests.ts"
]
}
-21
View File
@@ -1,21 +0,0 @@
/// <reference types="node"/>
import * as Alexa from "alexa-sdk";
exports.handler = function(event: Alexa.RequestBody, context: Alexa.Context, callback: Function) {
let alexa = Alexa.handler(event, context);
alexa.registerHandlers(handlers);
alexa.execute();
};
let handlers: Alexa.Handlers = {
'LaunchRequest': function () {
this.emit('SayHello');
},
'HelloWorldIntent': function () {
this.emit('SayHello');
},
'SayHello': function () {
this.emit(':tell', 'Hello World!');
}
};
-131
View File
@@ -1,131 +0,0 @@
// Type definitions for Alexa SDK for Node.js v1.0.3
// Project: https://github.com/alexa/alexa-skills-kit-sdk-for-nodejs
// Definitions by: Pete Beegle <https://github.com/petebeegle>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
export function handler(event: RequestBody, context: Context, callback?: Function): AlexaObject;
export function CreateStateHandler(state: string, obj: any): any;
export var StateString: string;
interface AlexaObject {
_event: any;
_context: any;
_callback: any;
state: any;
appId: any;
response: any;
dynamoDBTableName: any;
saveBeforeResponse: boolean;
registerHandlers: (...handlers: Handlers[]) => any;
execute: () => void;
}
interface Handlers {
[intent: string]: (this: Handler) => void;
}
interface Handler {
on: any;
emit(event: string, ...args: any[]): boolean;
emitWithState: any;
state: any;
handler: any;
event: RequestBody;
attributes: any;
context: any;
name: any;
isOverriden: any;
}
interface Context {
callbackWaitsForEmptyEventLoop: boolean;
logGroupName: string;
logStreamName: string;
functionName: string;
memoryLimitInMB: string;
functionVersion: string;
invokeid: string;
awsRequestId: string;
}
interface RequestBody {
version: string;
session: Session;
request: LaunchRequest | IntentRequest | SessionEndedRequest;
}
interface Session {
new: boolean;
sessionId: string;
attributes: any;
application: SessionApplication;
user: SessionUser;
}
interface SessionApplication {
applicationId: string;
}
interface SessionUser {
userId: string;
accessToken: string;
}
interface LaunchRequest extends IRequest { }
interface IntentRequest extends IRequest {
intent: Intent;
}
interface Intent {
name: string;
slots: any;
}
interface SessionEndedRequest extends IRequest {
reason: string;
}
interface IRequest {
type: "LaunchRequest" | "IntentRequest" | "SessionEndedRequest";
requestId: string;
timeStamp: string;
}
interface ResponseBody {
version: string;
sessionAttributes?: any;
response: Response;
}
interface Response {
outputSpeech?: OutputSpeech;
card?: Card;
reprompt?: Reprompt;
shouldEndSession: boolean;
}
interface OutputSpeech {
type: "PlainText" | "SSML";
text?: string;
ssml?: string;
}
interface Card {
type: "Simple" | "Standard" | "LinkAccount";
title?: string;
content?: string;
text?: string;
image?: Image;
}
interface Image {
smallImageUrl: string;
largeImageUrl: string;
}
interface Reprompt {
outputSpeech: OutputSpeech;
}
-22
View File
@@ -1,22 +0,0 @@
{
"compilerOptions": {
"module": "commonjs",
"lib": [
"es6"
],
"noImplicitAny": true,
"noImplicitThis": true,
"strictNullChecks": false,
"baseUrl": "../",
"typeRoots": [
"../"
],
"types": [],
"noEmit": true,
"forceConsistentCasingInFileNames": true
},
"files": [
"index.d.ts",
"alexa-sdk-tests.ts"
]
}
-135
View File
@@ -1,135 +0,0 @@
import algoliasearch = require('algoliasearch');
import { ClientOptions, SynonymOption, AlgoliaUserKeyOptions, SearchSynonymOptions,
AlgoliaSecuredApiOptions, AlgoliaIndexSettings, AlgoliaQueryParameters, AlgoliaIndex } from "algoliasearch";
var _clientOptions: ClientOptions = {
timeout : 12,
protocol: "",
httpAgent: ""
};
var _synonymOption: SynonymOption = {
forwardToSlaves: false,
replaceExistingSynonyms: false
};
var _algoliaUserKeyOptions : AlgoliaUserKeyOptions = {
validity: 0,
maxQueriesPerIPPerHour: 0,
indexes: [""],
queryParameters: { attributesToRetrieve: ["algolia"] },
description: ""
};
var _searchSynonymOptions : SearchSynonymOptions = {
query: "",
page: 0,
type: "",
hitsPerPage: 0
};
var _algoliaSecuredApiOptions: AlgoliaSecuredApiOptions = {
filters: "",
validUntil: 0,
restrictIndices: "",
userToken: ""
};
var _algoliaIndexSettings : AlgoliaIndexSettings = {
attributesToIndex: [""],
attributesforFaceting: [""],
unretrievableAttributes: [""],
attributesToRetrieve: [""],
ranking: [""],
customRanking: [""],
slaves: [""],
maxValuesPerFacet: '',
attributesToHighlight: [""],
attributesToSnippet: [""],
highlightPreTag: '',
highlightPostTag: '',
snippetEllipsisText: '',
restrictHighlightAndSnippetArrays: false,
hitsPerPage: 0,
minWordSizefor1Typo: 0,
minWordSizefor2Typos: 0,
typoTolerance: false,
allowTyposOnNumericTokens: false,
ignorePlurals: false,
disableTypoToleranceOnAttributes: '',
separatorsToIndex: '',
queryType: '',
removeWordsIfNoResults: '',
advancedSyntax: false,
optionalWords: [""],
removeStopWords: [""],
disablePrefixOnAttributes: [""],
disableExactOnAttributes: [""],
exactOnSingleWordQuery: '',
alternativesAsExact: false,
attributeForDistinct: "",
distinct: false,
numericAttributesToIndex: [""],
allowCompressionOfIntegerArray: false,
altCorrections: [{}],
minProximity: 0,
placeholders: ''
};
var _algoliaQueryParameters : AlgoliaQueryParameters = {
query: '',
filters: '',
attributesToRetrieve: [""],
restrictSearchableAttributes: [""],
facets: '',
maxValuesPerFacet: '',
attributesToHighlight: [''],
attributesToSnippet: [''],
highlightPreTag: '',
highlightPostTag: '',
snippetEllipsisText: '',
restrictHighlightAndSnippetArrays: false,
hitsPerPage: 0,
page: 0,
offset: 0,
length: 0,
minWordSizefor1Typo: 0,
minWordSizefor2Typos: 0,
typoTolerance: false,
allowTyposOnNumericTokens: false,
ignorePlurals: false,
disableTypoToleranceOnAttributes: '',
aroundLatLng: '',
aroundLatLngViaIP: '',
aroundRadius: '',
aroundPrecision: 0,
minimumAroundRadius: 0,
insideBoundingBox: '',
queryType: '',
insidePolygon: '',
removeWordsIfNoResults: '',
advancedSyntax: false,
optionalWords: [''],
removeStopWords: [''],
disableExactOnAttributes: [''],
exactOnSingleWordQuery: '',
alternativesAsExact: true,
distinct: 0,
getRankingInfo: false,
numericAttributesToIndex: [''],
numericFilters: [''],
tagFilters: '',
facetFilters: '',
analytics: false,
analyticsTags: [''],
synonyms: true,
replaceSynonymsInHighlight: false,
minProximity: 0
};
var index: AlgoliaIndex = algoliasearch('', '').initIndex('');
var search = index.search({query: ""});
index.search({query: ""}, function(err, res){});
-1528
View File
File diff suppressed because it is too large Load Diff
-22
View File
@@ -1,22 +0,0 @@
{
"compilerOptions": {
"module": "commonjs",
"lib": [
"es6"
],
"noImplicitAny": true,
"noImplicitThis": true,
"strictNullChecks": false,
"baseUrl": "../",
"typeRoots": [
"../"
],
"types": [],
"noEmit": true,
"forceConsistentCasingInFileNames": true
},
"files": [
"index.d.ts",
"algoliasearch-tests.ts"
]
}
-166
View File
@@ -1,166 +0,0 @@
// Type definitions for Alt 0.16.10
// Project: https://github.com/goatslacker/alt
// Definitions by: Michael Shearer <https://github.com/Shearerbeard>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
///<reference types="react"/>
declare namespace AltJS {
interface StoreReduce {
action:any;
data: any;
}
export interface StoreModel<S> {
//Actions
bindAction?( action:Action<any>, handler:ActionHandler):void;
bindActions?(actions:ActionsClass):void;
//Methods/Listeners
exportPublicMethods?(exportConfig:any):void;
bindListeners?(config:{[methodName:string]:Action<any> | Actions}):void;
exportAsync?(source:Source):void;
registerAsync?(datasource:Source):void;
//state
setState?(state:S):void;
setState?(stateFn:(currentState:S, nextState:S) => S):void;
getState?():S;
waitFor?(store:AltStore<any>):void;
//events
onSerialize?(fn:(data:any) => any):void;
onDeserialize?(fn:(data:any) => any):void;
on?(event:AltJS.lifeCycleEvents, callback:() => any):void;
emitChange?():void;
waitFor?(storeOrStores:AltStore<any> | Array<AltStore<any>>):void;
otherwise?(data:any, action:AltJS.Action<any>):void;
observe?(alt:Alt):any;
reduce?(state:any, config:StoreReduce):Object;
preventDefault?():void;
afterEach?(payload:Object, state:Object):void;
beforeEach?(payload:Object, state:Object):void;
// TODO: Embed dispatcher interface in def
dispatcher?:any;
//instance
getInstance?():AltJS.AltStore<S>;
alt?:Alt;
displayName?:string;
}
export type Source = {[name:string]: () => SourceModel<any>};
export interface SourceModel<S> {
local(state:any, ...args: any[]):any;
remote(state:any, ...args: any[]):Promise<S>;
shouldFetch?(fetchFn:(...args:Array<any>) => boolean):void;
loading?:(args:any) => void;
success?:(state:S) => void;
error?:(args:any) => void;
interceptResponse?(response:any, action:Action<any>, ...args:Array<any>):any;
}
export interface AltStore<S> {
getState():S;
listen(handler:(state:S) => any):() => void;
unlisten(handler:(state:S) => any):void;
emitChange():void;
}
export enum lifeCycleEvents {
bootstrap,
snapshot,
init,
rollback,
error
}
export type Actions = {[action:string]:Action<any>};
export interface Action<T> {
( args:T):void;
defer(data:any):void;
}
export interface ActionsClass {
generateActions?( ...action:Array<string>):void;
dispatch( ...payload:Array<any>):void;
actions?:Actions;
}
type StateTransform = (store:StoreModel<any>) => AltJS.AltStore<any>;
interface AltConfig {
dispatcher?:any;
serialize?:(serializeFn:(data:Object) => string) => void;
deserialize?:(deserializeFn:(serialData:string) => Object) => void;
storeTransforms?:Array<StateTransform>;
batchingFunction?:(callback:( ...data:Array<any>) => any) => void;
}
class Alt {
constructor(config?:AltConfig);
actions:Actions;
bootstrap(jsonData:string):void;
takeSnapshot( ...storeNames:Array<string>):string;
flush():Object;
recycle( ...stores:Array<AltJS.AltStore<any>>):void;
rollback():void;
dispatch(action?:AltJS.Action<any>, data?:Object, details?:any):void;
//Actions methods
addActions(actionsName:string, ActionsClass: ActionsClassConstructor):void;
createActions<T>(ActionsClass: ActionsClassConstructor, exportObj?: Object):T;
createActions<T>(ActionsClass: ActionsClassConstructor, exportObj?: Object, ...constructorArgs:Array<any>):T;
generateActions<T>( ...actions:Array<string>):T;
getActions(actionsName:string):AltJS.Actions;
//Stores methods
addStore(name:string, store:StoreModel<any>, saveStore?:boolean):void;
createStore<S>(store:StoreModel<S>, name?:string):AltJS.AltStore<S>;
getStore(name:string):AltJS.AltStore<any>;
}
export interface AltFactory {
new(config?:AltConfig):Alt;
}
type ActionsClassConstructor = new (alt:Alt) => AltJS.ActionsClass;
type ActionHandler = ( ...data:Array<any>) => any;
type ExportConfig = {[key:string]:(...args:Array<any>) => any};
}
declare module "alt/utils/chromeDebug" {
function chromeDebug(alt:AltJS.Alt):void;
export = chromeDebug;
}
declare module "alt/AltContainer" {
import React = require("react");
interface ContainerProps {
store?:AltJS.AltStore<any>;
stores?:Array<AltJS.AltStore<any>>;
inject?:{[key:string]:any};
actions?:{[key:string]:Object};
render?:(...props:Array<any>) => React.ReactElement<any>;
flux?:AltJS.Alt;
transform?:(store:AltJS.AltStore<any>, actions:any) => any;
shouldComponentUpdate?:(props:any) => boolean;
component?:React.Component<any, any>;
}
type AltContainer = React.ReactElement<ContainerProps>;
var AltContainer:React.ComponentClass<ContainerProps>;
export = AltContainer;
}
declare module "alt" {
var alt:AltJS.AltFactory;
export = alt;
}
-23
View File
@@ -1,23 +0,0 @@
{
"compilerOptions": {
"module": "commonjs",
"lib": [
"es6",
"dom"
],
"noImplicitAny": true,
"noImplicitThis": true,
"strictNullChecks": false,
"baseUrl": "../",
"typeRoots": [
"../"
],
"types": [],
"noEmit": true,
"forceConsistentCasingInFileNames": true
},
"files": [
"index.d.ts",
"alt-tests.ts"
]
}
-24
View File
@@ -1,24 +0,0 @@
// Type definitions for amazon-product-api
// Project: https://github.com/t3chnoboy/amazon-product-api
// Definitions by: Matti Lehtinen <https://github.com/MattiLehtinen/>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
interface ICredentials {
awsId: string,
awsSecret: string,
awsTag: string
}
interface IAmazonProductQueryCallback {
(err: string, results: Object[]): void;
}
interface IAmazonProductClient {
itemSearch(query: any, callback?: IAmazonProductQueryCallback): Promise<Object[]>;
itemLookup(query: any, callback?: IAmazonProductQueryCallback): Promise<Object[]>;
browseNodeLookup(query: any, callback?: IAmazonProductQueryCallback): Promise<Object[]>;
}
export declare function createClient(credentials: ICredentials): IAmazonProductClient;
-22
View File
@@ -1,22 +0,0 @@
{
"compilerOptions": {
"module": "commonjs",
"lib": [
"es6"
],
"noImplicitAny": true,
"noImplicitThis": true,
"strictNullChecks": false,
"baseUrl": "../",
"typeRoots": [
"../"
],
"types": [],
"noEmit": true,
"forceConsistentCasingInFileNames": true
},
"files": [
"index.d.ts",
"amazon-product-api-tests.ts"
]
}
-2603
View File
File diff suppressed because it is too large Load Diff
-22
View File
@@ -1,22 +0,0 @@
{
"compilerOptions": {
"module": "commonjs",
"lib": [
"es6",
"dom"
],
"noImplicitAny": false,
"noImplicitThis": true,
"strictNullChecks": false,
"baseUrl": "../",
"typeRoots": [
"../"
],
"types": [],
"noEmit": true,
"forceConsistentCasingInFileNames": true
},
"files": [
"index.d.ts"
]
}
@@ -1,5 +0,0 @@
amplify.request({
resourceId: "statusExample1"
}).done(function (data, status) {
}).fail(function (data, status) {
}).always(function (data, status) { });
-30
View File
@@ -1,30 +0,0 @@
// Type definitions for AmplifyJs (using JQuery Deferred) 1.1
// Project: http://amplifyjs.com/
// Definitions by: Jonas Eriksson <https://github.com/joeriks/>, Laurentiu Stamate <https://github.com/laurentiustamate94>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
/// <reference types="jquery" />
import * as amplify from "amplify";
declare module "amplify" {
interface Request {
/***
* Request a resource.
* resourceId: Identifier string for the resource.
* data: A set of key/value pairs of data to be sent to the resource.
* callback: A function to invoke if the resource is retrieved successfully.
*/
(resourceId: string, hash?: any, callback?: Function): JQueryPromise<any>;
/***
* Request a resource.
* settings: A set of key/value pairs of settings for the request.
* resourceId: Identifier string for the resource.
* data (optional): Data associated with the request.
* success (optional): Function to invoke on success.
* error (optional): Function to invoke on error.
*/
(settings: RequestSettings): JQueryPromise<any>;
}
}
-23
View File
@@ -1,23 +0,0 @@
{
"compilerOptions": {
"module": "commonjs",
"lib": [
"es6",
"dom"
],
"noImplicitAny": false,
"noImplicitThis": true,
"strictNullChecks": false,
"baseUrl": "../",
"typeRoots": [
"../"
],
"types": [],
"noEmit": true,
"forceConsistentCasingInFileNames": true
},
"files": [
"index.d.ts",
"amplify-deferred-tests.ts"
]
}
-6
View File
@@ -1,6 +0,0 @@
{
"extends": "../tslint.json",
"rules": {
"forbidden-types": false
}
}
-263
View File
@@ -1,263 +0,0 @@
/// <reference types="jquery" />
import amplify = require("amplify");
// Copied examples directly from AmplifyJs site
// Subscribe and publish with no data
amplify.subscribe("nodataexample", function () {
alert("nodataexample topic published!");
});
// Subscribe and publish with data
amplify.publish("nodataexample");
amplify.subscribe("dataexample", function (data) {
alert(data.foo); // bar
});
amplify.publish("dataexample", { foo: "bar" });
amplify.subscribe("dataexample2", function (param1, param2) {
alert(param1 + param2); // barbaz
});
//...
amplify.publish("dataexample2", "bar", "baz");
// Subscribe and publish with context and data
amplify.subscribe("datacontextexample", $("p:first"), function (data) {
this.text(data.exampleText); // first p element would have "foo bar baz" as text
});
amplify.publish("datacontextexample", { exampleText: "foo bar baz" });
// Subscribe to a topic with high priority
amplify.subscribe("priorityexample", function (data) {
alert(data.foo);
});
amplify.subscribe("priorityexample", function (data) {
if (data.foo === "oops") {
return false;
}
}, 1);
// Store data with amplify storage picking the default storage technology:
amplify.publish("priorityexample", { foo: "bar" });
amplify.publish("priorityexample", { foo: "oops" });
amplify.store("storeExample1", { foo: "bar" });
amplify.store("storeExample2", "baz");
// retrieve the data later via the key
var myStoredValue = amplify.store("storeExample1"),
myStoredValue2 = amplify.store("storeExample2"),
myStoredValues = amplify.store();
myStoredValue.foo; // bar
myStoredValue2; // baz
myStoredValues.storeExample1.foo; // bar
myStoredValues.storeExample2; // baz
// Store data explicitly with session storage
amplify.store.sessionStorage("explicitExample", { foo2: "baz" });
// retrieve the data later via the key
var myStoredValue2 = amplify.store.sessionStorage("explicitExample");
myStoredValue2.foo2; // baz
// REQUEST
// Set up and use a request utilizing Ajax
amplify.request.define("ajaxExample1", "ajax", {
url: "/myApiUrl",
dataType: "json",
type: "GET"
});
// later in code
amplify.request("ajaxExample1", function (data) {
data.foo; // bar
});
// Set up and use a request utilizing Ajax and Caching
amplify.request.define("ajaxExample2", "ajax", {
url: "/myApiUrl",
dataType: "json",
type: "GET",
cache: "persist"
});
// later in code
amplify.request("ajaxExample2", function (data) {
data.foo; // bar
});
// a second call will result in pulling from the cache
amplify.request("ajaxExample2", function (data) {
data.baz; // qux
})
// Set up and use a RESTful request utilizing Ajax
amplify.request.define("ajaxRESTFulExample", "ajax", {
url: "/myRestFulApi/{type}/{id}",
type: "GET"
})
// later in code
amplify.request("ajaxRESTFulExample",
{
type: "foo",
id: "bar"
},
function (data) {
// /myRESTFulApi/foo/bar was the URL used
data.foo; // bar
}
);
// POST data with Ajax
amplify.request.define("ajaxPostExample", "ajax", {
url: "/myRestFulApi",
type: "POST"
})
// later in code
amplify.request("ajaxPostExample",
{
type: "foo",
id: "bar"
},
function (data) {
data.foo; // bar
}
);
// Using data maps
// When searching Twitter, the key for the search phrase is q.If we want a more descriptive name, such as term, we can use a data map:
amplify.request.define("twitter-search", "ajax", {
url: "http://search.twitter.com/search.json",
dataType: "jsonp",
dataMap: {
term: "q"
}
});
amplify.request("twitter-search", { term: "amplifyjs" } );
// Similarly, we can create a request that searches for mentions, by accepting a username:
amplify.request.define("twitter-mentions", "ajax", {
url: "http://search.twitter.com/search.json",
dataType: "jsonp",
dataMap: function (data) {
return {
q: "@" + data.user
};
}
});
amplify.request("twitter-mentions", { user: "amplifyjs" });
// Setting up and using decoders
//Example:
var appEnvelopeDecoder: amplify.Decoder = function (data, status, xhr, success, error) {
if (data.status === "success") {
success(data.data);
} else if (data.status === "fail" || data.status === "error") {
error(data.message, data.status);
} else {
error(data.message, "fatal");
}
};
//a new decoder can be added to the amplifyDecoders interface
declare module "amplify" {
interface Decoders {
appEnvelope: amplify.Decoder;
}
}
amplify.request.decoders.appEnvelope = appEnvelopeDecoder;
//but you can also just add it via an index
amplify.request.decoders['appEnvelopeStr'] = appEnvelopeDecoder;
amplify.request.define("decoderExample", "ajax", {
url: "/myAjaxUrl",
type: "POST",
decoder: "appEnvelope"
});
amplify.request({
resourceId: "decoderExample",
success: function (data) {
data.foo; // bar
},
error: function (message, level) {
alert("always handle errors with alerts.");
}
});
// POST with caching and single - use decoder
// Example:
amplify.request.define("decoderSingleExample", "ajax", {
url: "/myAjaxUrl",
type: "POST",
decoder: function (data, status, xhr, success, error) {
if (data.status === "success") {
success(data.data);
} else if (data.status === "fail" || data.status === "error") {
error(data.message, data.status);
} else {
error(data.message, "fatal");
}
}
});
amplify.request({
resourceId: "decoderSingleExample",
success: function (data) {
data.foo; // bar
},
error: function (message, level) {
alert("always handle errors with alerts.");
}
});
// Handling Status
// Status in Success and Error Callbacks
// amplify.request comes with built in support for status.The status parameter appears in the default success or error callbacks when using an ajax definition.
amplify.request.define("statusExample1", "ajax", {
//...
});
amplify.request({
resourceId: "statusExample1",
success: function (data, status) {
},
error: function (data, status) {
}
});
-177
View File
@@ -1,177 +0,0 @@
// Type definitions for AmplifyJs 1.1
// Project: http://amplifyjs.com/
// Definitions by: Jonas Eriksson <https://github.com/joeriks/>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
/// <reference types="jquery" />
declare namespace amplify {
interface RequestSettings {
resourceId: string;
data?: any;
success?: (...args: any[]) => void;
error?: (...args: any[]) => void;
}
type Decoder =
(
data?: any,
status?: string,
xhr?: JQueryXHR,
success?: (...args: any[]) => void,
error?: (...args: any[]) => void
) => void;
interface Decoders {
[decoderName: string]: Decoder;
jsSend: Decoder;
}
interface AjaxSettings extends JQueryAjaxSettings {
cache?: any;
dataMap?: {} | ((data: any) => {});
decoder?: any /* string or amplifyDecoder */;
}
interface Request {
/***
* Request a resource.
* resourceId: Identifier string for the resource.
* data: A set of key/value pairs of data to be sent to the resource.
* callback: A function to invoke if the resource is retrieved successfully.
*/
(resourceId: string, hash?: any, callback?: Function): void;
/***
* Request a resource.
* settings: A set of key/value pairs of settings for the request.
* resourceId: Identifier string for the resource.
* data (optional): Data associated with the request.
* success (optional): Function to invoke on success.
* error (optional): Function to invoke on error.
*/
(settings: RequestSettings): any;
/***
* Define a resource.
* resourceId: Identifier string for the resource.
* requestType: The type of data retrieval method from the server. See the request types sections for more information.
* settings: A set of key/value pairs that relate to the server communication technology. The following settings are available:
* Any settings found in jQuery.ajax().
* cache: See the cache section for more details.
* decoder: See the decoder section for more details.
*/
define(resourceId: string, requestType: string, settings?: AjaxSettings): void;
/***
* Define a custom request.
* resourceId: Identifier string for the resource.
* resource: Function to handle requests. Receives a hash with the following properties:
* resourceId: Identifier string for the resource.
* data: Data provided by the user.
* success: Callback to invoke on success.
* error: Callback to invoke on error.
*/
define(resourceId: string, resource: (settings: RequestSettings) => void): void;
decoders: Decoders;
cache: any;
}
interface Subscribe {
/***
* Subscribe to a message.
* topic: Name of the message to subscribe to.
* callback: Function to invoke when the message is published.
* [priority]: Priority relative to other subscriptions for the same message. Lower values have higher priority. Default is 10.
*/
(topic: string, callback: Function, priority?: number): void;
/***
* Subscribe to a message.
* topic: Name of the message to subscribe to.
* context: What this will be when the callback is invoked.
* callback: Function to invoke when the message is published.
* [priority]: Priority relative to other subscriptions for the same message. Lower values have higher priority. Default is 10.
*/
(topic: string, context: any, callback: Function, priority?: number): void;
}
interface StorageTypeStore {
/***
* Stores a value for a given key using the default storage type.
*
* key: Identifier for the value being stored.
* value: The value to store. The value can be anything that can be serialized as JSON.
* [options]: A set of key/value pairs that relate to settings for storing the value.
*/
(key: string, value: any, options?: any): void;
/***
* Gets a stored value based on the key.
*/
(key: string): any;
/***
* Gets a hash of all stored values.
*/
(): any;
}
interface Store extends StorageTypeStore {
/***
* IE 8+, Firefox 3.5+, Safari 4+, Chrome, Opera 10.5+, iPhone 2+, Android 2+
*/
localStorage: StorageTypeStore;
/***
* IE 8+, Firefox 2+, Safari 4+, Chrome, Opera 10.5+, iPhone 2+, Android 2+
*/
sessionStorage: StorageTypeStore;
/***
* Firefox 2+
*/
globalStorage: StorageTypeStore;
/***
* IE 5 - 7
*/
userData: StorageTypeStore;
/***
* An in-memory store is provided as a fallback if none of the other storage types are available.
*/
memory: StorageTypeStore;
}
interface Static {
subscribe: Subscribe;
/***
* Remove a subscription.
* topic: The topic being unsubscribed from.
* callback: The callback that was originally subscribed.
*/
unsubscribe(topic: string, callback: Function): void;
/***
* Publish a message.
* topic: The name of the message to publish.
* Any additional parameters will be passed to the subscriptions.
* amplify.publish returns a boolean indicating whether any subscriptions returned false. The return value is true if none of the subscriptions returned false, and false otherwise. Note that only one subscription can return false because doing so will prevent additional subscriptions from being invoked.
*/
publish(topic: string, ...args: any[]): boolean;
store: Store;
request: Request;
}
}
declare var amplify: amplify.Static;
export = amplify;
export as namespace amplify;
-23
View File
@@ -1,23 +0,0 @@
{
"compilerOptions": {
"module": "commonjs",
"lib": [
"es6",
"dom"
],
"noImplicitAny": false,
"noImplicitThis": false,
"strictNullChecks": false,
"baseUrl": "../",
"typeRoots": [
"../"
],
"types": [],
"noEmit": true,
"forceConsistentCasingInFileNames": true
},
"files": [
"index.d.ts",
"amplify-tests.ts"
]
}
-7
View File
@@ -1,7 +0,0 @@
{
"extends": "../tslint.json",
"rules": {
"forbidden-types": false,
"unified-signatures": false
}
}
-22
View File
@@ -1,22 +0,0 @@
{
"compilerOptions": {
"module": "commonjs",
"lib": [
"es6"
],
"noImplicitAny": true,
"noImplicitThis": true,
"strictNullChecks": false,
"baseUrl": "../",
"typeRoots": [
"../"
],
"types": [],
"noEmit": true,
"forceConsistentCasingInFileNames": true
},
"files": [
"index.d.ts",
"amplitude-js-tests.ts"
]
}
-71
View File
@@ -1,71 +0,0 @@
// Type definitions for amqp-rpc v0.0.8
// Project: https://github.com/demchenkoe/node-amqp-rpc/
// Definitions by: Wonshik Kim <https://github.com/wokim/>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
/// <reference types="node" />
export interface Options {
connection?: any;
url?: string;
exchangeInstance?: any;
exchange?: string;
exchange_options?: {
exclusive?: boolean;
autoDelete?: boolean;
};
ipml_options?: {
defaultExchangeName?: string;
}
conn_options?: any;
}
export interface CallOptions {
correlationId?: string;
autoDeleteCallback?: any;
}
export interface HandlerOptions {
queueName?: string;
durable?: boolean;
exclusive?: boolean;
autoDelete?: boolean;
}
export interface BroadcastOptions {
ttl?: number;
onResponse?: any;
context?: any;
onComplete?: any;
}
export interface CommandInfo {
cmd?: string;
exchange?: string;
contentType?: string;
size?: number;
}
export interface Callback {
(...args: any[]): void;
}
export interface CallbackWithError {
(err: any, ...args: any[]): void;
}
export declare function factory(opt?: Options): amqpRPC;
export declare class amqpRPC {
constructor(opt?: Options);
generateQueueName(type: string): string;
disconnect(): void;
call<T>(cmd: string, params: T, cb?: Callback, context?: any, options?: CallOptions): string;
on<T>(cmd: string, cb: (param?: T, cb?: Callback, info?: CommandInfo) => void, context?: any, options?: HandlerOptions): boolean;
off(cmd: string): boolean;
callBroadcast<T>(cmd: string, params: T, options?: BroadcastOptions): void;
onBroadcast<T>(cmd: string, cb?: (params?: T, cb?: CallbackWithError) => void, context?: any, options?: any): boolean;
offBroadcast(cmd: string): boolean;
}
-22
View File
@@ -1,22 +0,0 @@
{
"compilerOptions": {
"module": "commonjs",
"lib": [
"es6"
],
"noImplicitAny": true,
"noImplicitThis": true,
"strictNullChecks": false,
"baseUrl": "../",
"typeRoots": [
"../"
],
"types": [],
"noEmit": true,
"forceConsistentCasingInFileNames": true
},
"files": [
"index.d.ts",
"amqp-rpc-tests.ts"
]
}
-65
View File
@@ -1,65 +0,0 @@
// promise api tests
import amqp = require('amqplib');
var msg = 'Hello World';
// test promise api
amqp.connect('amqp://localhost')
.then(connection => {
return connection.createChannel()
.tap(channel => channel.checkQueue('myQueue'))
.then(channel => channel.sendToQueue('myQueue', new Buffer(msg)))
.finally(() => connection.close());
});
amqp.connect('amqp://localhost')
.then(connection => {
return connection.createChannel()
.tap(channel => channel.checkQueue('myQueue'))
.then(channel => channel.consume('myQueue', newMsg => console.log('New Message: ' + newMsg.content.toString())))
.finally(() => connection.close());
});
// test promise api properties
var amqpMessage: amqp.Message;
amqpMessage.properties.contentType = 'application/json';
var amqpAssertExchangeOptions: amqp.Options.AssertExchange;
var anqpAssertExchangeReplies: amqp.Replies.AssertExchange;
// callback api tests
import amqpcb = require('amqplib/callback_api');
amqpcb.connect('amqp://localhost', (err, connection) => {
if(!err) {
connection.createChannel((err, channel) => {
if (!err) {
channel.assertQueue('myQueue', {}, (err, ok) => {
if(!err) {
channel.sendToQueue('myQueue', new Buffer(msg));
}
});
}
});
}
});
amqpcb.connect('amqp://localhost', (err, connection) => {
if(!err) {
connection.createChannel((err, channel) => {
if (!err) {
channel.assertQueue('myQueue', {}, (err, ok) => {
if(!err) {
channel.consume('myQueue', newMsg => console.log('New Message: ' + newMsg.content.toString()));
}
});
}
});
}
});
// test callback api properties
var amqpcbMessage: amqpcb.Message;
amqpcbMessage.properties.contentType = 'application/json';
var amqpcbAssertExchangeOptions: amqpcb.Options.AssertExchange;
var anqpcbAssertExchangeReplies: amqpcb.Replies.AssertExchange;
-65
View File
@@ -1,65 +0,0 @@
// Type definitions for amqplib 0.5
// Project: https://github.com/squaremo/amqp.node
// Definitions by: Michael Nahkies <https://github.com/mnahkies>, Ab Reitsma <https://github.com/abreits>, Nicolás Fantone <https://github.com/nfantone>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
/// <reference types="node" />
import * as Promise from 'bluebird';
import * as events from 'events';
import { Replies, Options, Message } from './properties';
export * from './properties';
export interface Connection extends events.EventEmitter {
close(): Promise<void>;
createChannel(): Promise<Channel>;
createConfirmChannel(): Promise<ConfirmChannel>;
}
export interface Channel extends events.EventEmitter {
close(): Promise<void>;
assertQueue(queue: string, options?: Options.AssertQueue): Promise<Replies.AssertQueue>;
checkQueue(queue: string): Promise<Replies.AssertQueue>;
deleteQueue(queue: string, options?: Options.DeleteQueue): Promise<Replies.DeleteQueue>;
purgeQueue(queue: string): Promise<Replies.PurgeQueue>;
bindQueue(queue: string, source: string, pattern: string, args?: any): Promise<Replies.Empty>;
unbindQueue(queue: string, source: string, pattern: string, args?: any): Promise<Replies.Empty>;
assertExchange(exchange: string, type: string, options?: Options.AssertExchange): Promise<Replies.AssertExchange>;
checkExchange(exchange: string): Promise<Replies.Empty>;
deleteExchange(exchange: string, options?: Options.DeleteExchange): Promise<Replies.Empty>;
bindExchange(destination: string, source: string, pattern: string, args?: any): Promise<Replies.Empty>;
unbindExchange(destination: string, source: string, pattern: string, args?: any): Promise<Replies.Empty>;
publish(exchange: string, routingKey: string, content: Buffer, options?: Options.Publish): boolean;
sendToQueue(queue: string, content: Buffer, options?: Options.Publish): boolean;
consume(queue: string, onMessage: (msg: Message) => any, options?: Options.Consume): Promise<Replies.Consume>;
cancel(consumerTag: string): Promise<Replies.Empty>;
get(queue: string, options?: Options.Get): Promise<Message | boolean>;
ack(message: Message, allUpTo?: boolean): void;
ackAll(): void;
nack(message: Message, allUpTo?: boolean, requeue?: boolean): void;
nackAll(requeue?: boolean): void;
reject(message: Message, requeue?: boolean): void;
prefetch(count: number, global?: boolean): Promise<Replies.Empty>;
recover(): Promise<Replies.Empty>;
}
export interface ConfirmChannel extends Channel {
publish(exchange: string, routingKey: string, content: Buffer, options?: Options.Publish, callback?: (err: any, ok: Replies.Empty) => void): boolean;
sendToQueue(queue: string, content: Buffer, options?: Options.Publish, callback?: (err: any, ok: Replies.Empty) => void): boolean;
waitForConfirms(): Promise<void>;
}
export function connect(url: string, socketOptions?: any): Promise<Connection>;
-23
View File
@@ -1,23 +0,0 @@
{
"compilerOptions": {
"module": "commonjs",
"lib": [
"es6"
],
"noImplicitAny": true,
"noImplicitThis": true,
"strictNullChecks": false,
"baseUrl": "../",
"typeRoots": [
"../"
],
"types": [],
"noEmit": true,
"forceConsistentCasingInFileNames": true
},
"files": [
"index.d.ts",
"callback_api.d.ts",
"amqplib-tests.ts"
]
}
-6
View File
@@ -1,6 +0,0 @@
{
"extends": "../tslint.json",
"rules": {
"no-empty-interface": false
}
}
-23
View File
@@ -1,23 +0,0 @@
{
"compilerOptions": {
"module": "commonjs",
"lib": [
"es6",
"dom"
],
"noImplicitAny": true,
"noImplicitThis": true,
"strictNullChecks": false,
"baseUrl": "../",
"typeRoots": [
"../"
],
"types": [],
"noEmit": true,
"forceConsistentCasingInFileNames": true
},
"files": [
"index.d.ts",
"analytics-node-tests.ts"
]
}
-106
View File
@@ -1,106 +0,0 @@
// Type definitions for AngularAgility
// Project: https://github.com/AngularAgility/AngularAgility
// Definitions by: Roland Zwaga <https://github.com/rolandzwaga>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
/// <reference types="angular" />
declare namespace aa {
export interface ILabelStrategies {
[strategyName: string]: (element:ng.IAugmentedJQueryStatic, labelText:string, isRequired:boolean)=>void;
}
export interface IFieldGroupStrategies {
[strategyName: string]: (element:ng.IAugmentedJQueryStatic)=>void;
}
export interface IValMsgPlacementStrategies {
[strategyName: string]: (formFieldElement:ng.IAugmentedJQueryStatic, formName:string, formFieldName:string)=>void;
}
export interface IValidIconStrategy {
validIcon:string;
invalidIcon:string;
getContainer(element:ng.IAugmentedJQueryStatic):void;
}
export interface ISpinnerClickStrategies {
[strategyName: string]: (element:ng.IAugmentedJQueryStatic)=>void;
}
export interface IOnNavigateAwayStrategies {
[strategyName: string]: (rootFormScope:ng.IScope, rootForm:ng.IAugmentedJQueryStatic, $injector:ng.auto.IInjectorService)=>void;
}
export interface IValidationMessages {
[validationKey: string]: string;
}
export interface IGlobalSettings {
[settingName: string]: any;
}
export interface IFormExtensionsProvider extends ng.IServiceProvider {
defaultLabelStrategy:string;
defaultFieldGroupStrategy:string;
defaultValMsgPlacementStrategy:string;
validIconStrategy:IValidIconStrategy;
defaultSpinnerClickStrategy:string;
defaultNotifyTarget:string;
defaultOnNavigateAwayStrategy:string;
validationMessages:IValidationMessages;
valMsgForTemplate:string;
confirmResetStrategy:()=>boolean;
globalSettings:IGlobalSettings;
labelStrategies:ILabelStrategies;
fieldGroupStrategies:IFieldGroupStrategies;
valMsgPlacementStrategies:IValMsgPlacementStrategies;
spinnerClickStrategies:ISpinnerClickStrategies;
onNavigateAwayStrategies:IOnNavigateAwayStrategies;
}
export interface INotifyPredicate {
(message:string, options:any, notifier:any):any;
}
export interface INotifyDefaults {
success: INotifyPredicate;
info: INotifyPredicate;
warning: INotifyPredicate;
danger: INotifyPredicate;
error: INotifyPredicate;
}
export interface INotifyConfig {
name:string;
template?:string;
templateName?:string;
options:INotifyOptions;
namedDefaults:INotifyDefaults;
}
export interface INotifyOptions {
cssClasses?:string;
messageType:string;
allowHtml:boolean;
message:string;
}
export interface INotifyConfigProvider extends ng.IServiceProvider {
notifyConfigs:any;
defaultTargetContainerName:string;
defaultNotifyConfig:string;
addOrUpdateNotifyConfig(name:string, opts:INotifyConfig):void;
optionsTransformer(options:INotifyOptions, $sce:ng.ISCEService):void;
}
export interface IExternalFormValidationConfig {
validations:any;
ignore?:any;
globals?:any;
resolve?:any;
resolveFn?:(modelValue:string)=>string;
}
}
-23
View File
@@ -1,23 +0,0 @@
{
"compilerOptions": {
"module": "commonjs",
"lib": [
"es6",
"dom"
],
"noImplicitAny": true,
"noImplicitThis": true,
"strictNullChecks": false,
"baseUrl": "../",
"typeRoots": [
"../"
],
"types": [],
"noEmit": true,
"forceConsistentCasingInFileNames": true
},
"files": [
"index.d.ts",
"angular-agility-tests.ts"
]
}
-309
View File
@@ -1,309 +0,0 @@
// Type definitions for Angular JS (ngAnimate module) 1.5
// Project: http://angularjs.org
// Definitions by: Michel Salib <https://github.com/michelsalib>, Adi Dahiya <https://github.com/adidahiya>, Raphael Schweizer <https://github.com/rasch>, Cody Schaaf <https://github.com/codyschaaf>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
/// <reference types="jquery" />
declare var _: string;
export = _;
import * as angular from 'angular';
declare module 'angular' {
/**
* ngAnimate module (angular-animate.js)
*/
namespace animate {
interface IAnimateFactory {
(...args: any[]): IAnimateCallbackObject;
}
interface IAnimateCallbackObject {
eventFn?: (element: JQuery, doneFunction: Function, options: IAnimationOptions) => any;
setClass?: (element: JQuery, addedClasses: string, removedClasses: string, doneFunction: Function, options: IAnimationOptions) => any;
addClass?: (element: JQuery, addedClasses: string, doneFunction: Function, options: IAnimationOptions) => any;
removeClass?: (element: JQuery, removedClasses: string, doneFunction: Function, options: IAnimationOptions) => any;
enter?: (element: JQuery, doneFunction: Function, options: IAnimationOptions) => any;
leave?: (element: JQuery, doneFunction: Function, options: IAnimationOptions) => any;
move?: (element: JQuery, doneFunction: Function, options: IAnimationOptions) => any;
animate?: (element: JQuery, fromStyles: string, toStyles: string, doneFunction: Function, options: IAnimationOptions) => any;
}
interface IAnimationPromise extends IPromise<void> { }
/**
* AnimateService
* see http://docs.angularjs.org/api/ngAnimate/service/$animate
*/
interface IAnimateService {
/**
* Sets up an event listener to fire whenever the animation event has fired on the given element or among any of its children.
*
* @param event the animation event that will be captured (e.g. enter, leave, move, addClass, removeClass, etc...)
* @param container the container element that will capture each of the animation events that are fired on itself as well as among its children
* @param callback the callback function that will be fired when the listener is triggered
*/
on(event: string, container: JQuery, callback: (element?: JQuery, phase?: string) => any): void;
/**
* Deregisters an event listener based on the event which has been associated with the provided element.
*
* @param event the animation event (e.g. enter, leave, move, addClass, removeClass, etc...)
* @param container the container element the event listener was placed on
* @param callback the callback function that was registered as the listener
*/
off(event: string, container?: JQuery, callback?: (element?: JQuery, phase?: string) => any): void;
/**
* Associates the provided element with a host parent element to allow the element to be animated even if it exists outside of the DOM structure of the Angular application.
*
* @param element the external element that will be pinned
* @param parentElement the host parent element that will be associated with the external element
*/
pin(element: JQuery, parentElement: JQuery): void;
/**
* Globally enables / disables animations.
*
* @param element If provided then the element will be used to represent the enable/disable operation.
* @param value If provided then set the animation on or off.
* @returns current animation state
*/
enabled(element: JQuery, value?: boolean): boolean;
enabled(value?: boolean): boolean;
/**
* Cancels the provided animation.
*/
cancel(animationPromise: IAnimationPromise): void;
/**
* Performs an inline animation on the element.
*
* @param element the element that will be the focus of the animation
* @param from a collection of CSS styles that will be applied to the element at the start of the animation
* @param to a collection of CSS styles that the element will animate towards
* @param className an optional CSS class that will be added to the element for the duration of the animation (the default class is 'ng-inline-animate')
* @param options an optional collection of styles that will be picked up by the CSS transition/animation
* @returns the animation callback promise
*/
animate(element: JQuery, from: any, to: any, className?: string, options?: IAnimationOptions): IAnimationPromise;
/**
* Appends the element to the parentElement element that resides in the document and then runs the enter animation.
*
* @param element the element that will be the focus of the enter animation
* @param parentElement the parent element of the element that will be the focus of the enter animation
* @param afterElement the sibling element (which is the previous element) of the element that will be the focus of the enter animation
* @param options an optional collection of styles that will be picked up by the CSS transition/animation
* @returns the animation callback promise
*/
enter(element: JQuery, parentElement: JQuery, afterElement?: JQuery, options?: IAnimationOptions): IAnimationPromise;
/**
* Runs the leave animation operation and, upon completion, removes the element from the DOM.
*
* @param element the element that will be the focus of the leave animation
* @param options an optional collection of styles that will be picked up by the CSS transition/animation
* @returns the animation callback promise
*/
leave(element: JQuery, options?: IAnimationOptions): IAnimationPromise;
/**
* Fires the move DOM operation. Just before the animation starts, the animate service will either append
* it into the parentElement container or add the element directly after the afterElement element if present.
* Then the move animation will be run.
*
* @param element the element that will be the focus of the move animation
* @param parentElement the parent element of the element that will be the focus of the move animation
* @param afterElement the sibling element (which is the previous element) of the element that will be the focus of the move animation
* @returns the animation callback promise
*/
move(element: JQuery, parentElement: JQuery, afterElement?: JQuery): IAnimationPromise;
/**
* Triggers a custom animation event based off the className variable and then attaches the className
* value to the element as a CSS class.
*
* @param element the element that will be animated
* @param className the CSS class that will be added to the element and then animated
* @param options an optional collection of styles that will be picked up by the CSS transition/animation
* @returns the animation callback promise
*/
addClass(element: JQuery, className: string, options?: IAnimationOptions): IAnimationPromise;
/**
* Triggers a custom animation event based off the className variable and then removes the CSS class
* provided by the className value from the element.
*
* @param element the element that will be animated
* @param className the CSS class that will be animated and then removed from the element
* @param options an optional collection of styles that will be picked up by the CSS transition/animation
* @returns the animation callback promise
*/
removeClass(element: JQuery, className: string, options?: IAnimationOptions): IAnimationPromise;
/**
* Adds and/or removes the given CSS classes to and from the element. Once complete, the done() callback
* will be fired (if provided).
*
* @param element the element which will have its CSS classes changed removed from it
* @param add the CSS classes which will be added to the element
* @param remove the CSS class which will be removed from the element CSS classes have been set on the element
* @param options an optional collection of styles that will be picked up by the CSS transition/animation
* @returns the animation callback promise
*/
setClass(element: JQuery, add: string, remove: string, options?: IAnimationOptions): IAnimationPromise;
}
/**
* AnimateProvider
* see http://docs.angularjs.org/api/ngAnimate/provider/$animateProvider
*/
interface IAnimateProvider {
/**
* Registers a new injectable animation factory function.
*
* @param name The name of the animation.
* @param factory The factory function that will be executed to return the animation object.
*/
register(name: string, factory: IAnimateFactory): void;
/**
* Gets and/or sets the CSS class expression that is checked when performing an animation.
*
* @param expression The className expression which will be checked against all animations.
* @returns The current CSS className expression value. If null then there is no expression value.
*/
classNameFilter(expression?: RegExp): RegExp;
}
/**
* Angular Animation Options
* see https://docs.angularjs.org/api/ngAnimate/#applying-directive-specific-styles-to-an-animation
*/
interface IAnimationOptions {
/**
* The DOM event (e.g. enter, leave, move). When used, a generated CSS class of ng-EVENT and
* ng-EVENT-active will be applied to the element during the animation. Multiple events can be provided when
* spaces are used as a separator. (Note that this will not perform any DOM operation.)
*/
event?: string;
/**
* Indicates that the ng-prefix will be added to the event class. Setting to false or
* omitting will turn ng-EVENT and ng-EVENT-active in EVENT and EVENT-active. Unused if event is omitted.
*/
structural?: boolean;
/**
* The CSS easing value that will be applied to the transition or keyframe animation (or both).
*/
easing?: string;
/**
* The raw CSS transition style that will be used (e.g. 1s linear all).
*/
transitionStyle?: string;
/**
* The raw CSS keyframe animation style that will be used (e.g. 1s my_animation linear).
*/
keyframeStyle?: string;
/**
* The starting CSS styles (a key/value object) that will be applied at the start of the animation.
*/
from?: Object;
/**
* The ending CSS styles (a key/value object) that will be applied across the animation via a CSS transition.
*/
to?: Object;
/**
* A space separated list of CSS classes that will be added to the element and spread across the animation.
*/
addClass?: string;
/**
* A space separated list of CSS classes that will be removed from the element and spread across
* the animation.
*/
removeClass?: string;
/**
* A number value representing the total duration of the transition and/or keyframe (note that a value
* of 1 is 1000ms). If a value of 0 is provided then the animation will be skipped entirely.
*/
duration?: number;
/**
* A number value representing the total delay of the transition and/or keyframe (note that a value of
* 1 is 1000ms). If a value of true is used then whatever delay value is detected from the CSS classes will be
* mirrored on the elements styles (e.g. by setting delay true then the style value of the element will be
* transition-delay: DETECTED_VALUE). Using true is useful when you want the CSS classes and inline styles to
* all share the same CSS delay value.
*/
delay?: number;
/**
* A numeric time value representing the delay between successively animated elements (Click here to
* learn how CSS-based staggering works in ngAnimate.)
*/
stagger?: number;
/**
* The numeric index representing the stagger item (e.g. a value of 5 is equal to the sixth item
* in the stagger; therefore when a stagger option value of 0.1 is used then there will be a stagger delay of 600ms)
*
*/
staggerIndex?: number;
/**
* Whether or not the provided from and to styles will be removed once the animation is closed. This is useful for
* when the styles are used purely for the sake of the animation and do not have a lasting visual effect on the element
* (e.g. a colapse and open animation). By default this value is set to false.
*/
cleanupStyles?: boolean;
}
interface IAnimateCssRunner {
/**
* Starts the animation
*
* @returns The animation runner with a done function for supplying a callback.
*/
start(): IAnimateCssRunnerStart;
/**
* Ends (aborts) the animation
*/
end(): void;
}
interface IAnimateCssRunnerStart extends IPromise<void> {
/**
* Allows you to add done callbacks to the running animation
*
* @param callbackFn: the callback function to be run
*/
done(callbackFn: (animationFinished: boolean) => void): void;
}
/**
* AnimateCssService
* see http://docs.angularjs.org/api/ngAnimate/service/$animateCss
*/
interface IAnimateCssService {
(element: JQuery, animateCssOptions: IAnimationOptions): IAnimateCssRunner;
}
}
interface IModule {
animation(name: string, animationFactory: angular.animate.IAnimateFactory): IModule;
animation(name: string, inlineAnnotatedFunction: any[]): IModule;
animation(object: Object): IModule;
}
}
-22
View File
@@ -1,22 +0,0 @@
{
"files": [
"index.d.ts"
],
"compilerOptions": {
"module": "commonjs",
"lib": [
"es6",
"dom"
],
"noImplicitAny": true,
"noImplicitThis": true,
"strictNullChecks": false,
"baseUrl": "../",
"typeRoots": [
"../"
],
"types": [],
"noEmit": true,
"forceConsistentCasingInFileNames": true
}
}
-181
View File
@@ -1,181 +0,0 @@
// Type definitions for angular-bootstrap-calendar
// Project: https://github.com/mattlewis92/angular-bootstrap-calendar
// Definitions by: Egor Komarov <https://github.com/Odrin>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
import * as moment from 'moment';
import * as angular from 'angular';
declare module 'angular' {
export namespace bootstrap.calendar {
interface IEventAction {
/**
* The label of the action
*/
label: string;
/**
* CSS class to be added to the action element
*/
cssClass?: string;
/**
* The action that occurs when it's clicked
* @param args - the IEvent whose action was clicked
*/
onClick: (args: any) => void;
}
interface IEventColor {
/**
* The primary color of the event, should be darker than secondary
*/
primary: string;
/**
* The secondary color of the event, should be lighter than primary
*/
secondary: string;
}
interface IEvent {
/**
* The title of the event
*/
title: string;
/**
* The type of the event (determines its color). Can be important, warning, info, inverse, success or special
*/
type?: string;
/**
* A javascript date object for when the event starts
*/
startsAt: Date;
/**
* Optional - a javascript date object for when the event ends
*/
endsAt?: Date;
/**
* Color of the Event
*/
color?: IEventColor;
/**
* Actions of the Event
*/
actions?: Array<IEventAction>;
/**
* If edit-event-html is set and this field is explicitly set to false then dont make it editable.
*/
editable?: boolean;
/**
* If delete-event-html is set and this field is explicitly set to false then dont make it deleteable
*/
deletable?: boolean;
/**
* Allow an event to be dragged and dropped
*/
draggable?: boolean;
/**
* Allow an event to be resizable
*/
resizable?: boolean;
/**
* If set to false then will not count towards the badge total amount on the month and year view
*/
incrementsBadgeTotal?: boolean;
/**
* If set the event will recur on the given period. Valid values are year or month
*/
recursOn?: string;
/**
* A CSS class (or more, just separate with spaces) that will be added to the event when it is displayed on each view. Useful for marking an event as selected / active etc
*/
cssClass?: string;
/**
* If set the event will display as all-day event
*/
allDay?: boolean;
}
interface ICalendarConfig {
allDateFormats: {
angular: IFormats;
moment: IFormats;
};
dateFormats: IDateFormats;
titleFormats: ITitleFormats;
dateFormatter: string;
displayEventEndTimes: boolean;
showTimesOnWeekView: boolean;
displayAllMonthEvents: boolean;
i18nStrings: { weekNumber: string; };
templates: {
calendarDayView: string;
calendarHourList: string;
calendarMonthCell: string;
calendarMonthCellEvents: string;
calendarMonthView: string;
calendarSlideBox: string;
calendarWeekView: string;
calendarYearView: string;
};
}
interface IFormats {
date: IDateFormats;
title: ITitleFormats;
}
interface IDateFormats {
hour: string;
day: string;
month: string;
weekDay: string;
time: string;
datetime: string;
}
interface ITitleFormats {
day: string;
week: string;
month: string;
year: string;
}
interface ICalendarCell {
label: number;
date: moment.Moment;
inMonth: boolean;
isPast: boolean;
isToday: boolean;
isFuture: boolean;
isWeekend: boolean;
events: IEvent[];
badgeTotal: number;
}
namespace events {
interface IOnEventClick {
(calendarEvent: IEvent): void;
}
interface IOnEventTimesChanged {
(calendarEvent: IEvent, calendarNewEventStart: Date, calendarNewEventEnd: Date): void;
}
interface IOnEditEventClick {
(calendarEvent: IEvent): void;
}
interface IOnDeleteEventClick {
(calendarEvent: IEvent): void;
}
interface IOnTimespanClick {
(calendarDate: Date, calendarCell: ICalendarCell): void;
}
interface IOnViewChangeClick {
(calendarDate: Date, calendarNextView: string): boolean;
}
}
}
}
-5
View File
@@ -1,5 +0,0 @@
{
"dependencies": {
"moment": ">=2.14.0"
}
}
-23
View File
@@ -1,23 +0,0 @@
{
"compilerOptions": {
"module": "commonjs",
"lib": [
"es6",
"dom"
],
"noImplicitAny": true,
"noImplicitThis": true,
"strictNullChecks": false,
"baseUrl": "../",
"typeRoots": [
"../"
],
"types": [],
"noEmit": true,
"forceConsistentCasingInFileNames": true
},
"files": [
"index.d.ts",
"angular-bootstrap-calendar-tests.ts"
]
}
-22
View File
@@ -1,22 +0,0 @@
{
"compilerOptions": {
"module": "commonjs",
"lib": [
"es6"
],
"noImplicitAny": true,
"noImplicitThis": true,
"strictNullChecks": false,
"baseUrl": "../",
"typeRoots": [
"../"
],
"types": [],
"noEmit": true,
"forceConsistentCasingInFileNames": true
},
"files": [
"index.d.ts",
"angular-bootstrap-lightbox-tests.ts"
]
}
-86
View File
@@ -1,86 +0,0 @@
// Type definitions for angular-breadcrumb 0.4.1
// Project: https://github.com/ncuillery/angular-breadcrumb
// Definitions by: Marc Talary <https://github.com/marctalary>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
/// <reference types="angular-ui-router" />
import * as angular from 'angular';
declare var _: string;
export = _;
declare module 'angular' {
namespace ui {
export interface IState {
ncyBreadcrumb?: {
/**
* Contains the label for the step in the breadcrumb. The state name is used if not defined.
**/
label?: string;
/**
* Override the parent state (only for the breadcrumb)
**/
parent?: string|Function;
/**
* When defined to true, the state is never included in the chain of states and never appears in the breadcrumb
**/
skip?: boolean;
};
ncyBreadcrumbLabel?: string;
ncyBreadcrumbLink?: string;
}
}
namespace ncy {
/**
* Provider that returns an instance of $breadcrumb service. It contains the global configuration of the module.
**/
export interface $breadcrumbProvider {
/**
* Setter for options defined in a module.config block
**/
setOptions(options: breadcrumbProviderOptions): void;
}
/**
* Global configuration options for angular-breadcrumb
**/
export interface breadcrumbProviderOptions {
/**
* An existing state's name to be the state is the first step of the breadcrumb
**/
prefixStateName?: string;
/**
* Contains a predefined template's name; 'bootstrap3' (default), 'bootstrap2' or HTML for a custom template. This property is ignored if templateUrl is defined.
**/
template?: string;
/**
* Contains the path to a template file. This property takes precedence over the template property.
**/
templateUrl?: string;
/**
* If true, abstract states are included in the breadcrumb. This option has a lower priority than the state-specific option skip
**/
includeAbstract?: boolean;
}
/**
* Service responsible for access to $state and for directive configuration.
**/
export interface $breadcrumbService {
/**
* Returns the state chain to the current state (i.e. all the steps of the breadcrumb). It's an array of state object enriched with the module-specific property ncyBreadcrumbLink (the href for the breadcrumb step).
**/
getStatesChain(): angular.ui.IState[];
/**
* Return the last step of the breadcrumb, generally the one relative to the current state, expect if it is configured as skipped (the method returns its parent). As getStatesChain, the state object is enriched with ncyBreadcrumbLink.
**/
getLastStep(): angular.ui.IState;
}
}
}
-22
View File
@@ -1,22 +0,0 @@
{
"compilerOptions": {
"module": "commonjs",
"lib": [
"es6",
"dom"
],
"noImplicitAny": true,
"noImplicitThis": true,
"strictNullChecks": false,
"baseUrl": "../",
"typeRoots": [
"../"
],
"types": [],
"noEmit": true,
"forceConsistentCasingInFileNames": true
},
"files": [
"index.d.ts"
]
}
@@ -1,11 +0,0 @@
import * as angular from "angular";
import {ClipboardService} from "angular-clipboard";
const app = angular.module('testModule', ['angular-clipboard']);
app.controller('TestController', ($scope: ng.IScope, clipboard: ClipboardService) => {
$scope['testCopy'] = () => {
if (clipboard.supported) {
clipboard.copyText('hiiiiiii');
}
};
});
-20
View File
@@ -1,20 +0,0 @@
// Type definitions for angular-clipboard v1.5
// Project: https://github.com/omichelsen/angular-clipboard
// Definitions by: Bradford Wagner <https://github.com/bradfordwagner/>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
/**
* Definition of the Clipboard Service
*/
export interface ClipboardService {
/**
* tells us whether or not angular-clipboard is supported
*/
supported: boolean;
/**
* copies text to a clipboard
* @param text the text to be copied to the clipboard
*/
copyText(text: string): void;
}
-23
View File
@@ -1,23 +0,0 @@
{
"files": [
"index.d.ts",
"angular-clipboard-tests.ts"
],
"compilerOptions": {
"module": "commonjs",
"lib": [
"es6",
"dom"
],
"noImplicitAny": true,
"noImplicitThis": true,
"strictNullChecks": true,
"baseUrl": "../",
"typeRoots": [
"../"
],
"types": [],
"noEmit": true,
"forceConsistentCasingInFileNames": true
}
}
-67
View File
@@ -1,67 +0,0 @@
// Type definitions for angular-cookie v4.1.0
// Project: https://github.com/ivpusic/angular-cookie
// Definitions by: Borislav Zhivkov <https://github.com/borislavjivkov>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
/// <reference types="angular" />
declare namespace angular.cookie {
interface CookieService {
/**
* Get all cookies
*/
(): any;
/**
* Get a cookie with a specific key
*/
(key: string): any;
/**
* Create a cookie
*/
(key: string, value: any, options?: CookieOptions): any;
/**
* Remove a cookie
*/
remove(key: string, options?: CookieOptions): void;
}
interface CookieOptions {
/**
* The domain tells the browser to which domain the cookie should be sent. If you don't specify it, it becomes the domain of the page that sets the cookie.
*/
domain?: string;
/**
* The path gives you the chance to specify a directory where the cookie is active.
*/
path?: string;
/**
* Each cookie has an expiry date after which it is trashed. If you don't specify the expiry date the cookie is trashed when you close the browser.
*/
expires?: number;
/**
* Allows you to set the expiration time in hours, minutes, seconds, or `milliseconds. If this is not specified, any expiration time specified will default to days.
*/
expirationUnit?: string;
/**
* The Secure attribute is meant to keep cookie communication limited to encrypted transmission, directing browsers to use cookies only via secure/encrypted connections.
*/
secure?: boolean;
/**
* The method that will be used to encode the cookie value (should be passed when using Set).
*/
encode?: (value: any) => any;
/**
* The method that will be used to decode extracted cookie values (should be passed when using Get).
*/
decode?: (value: any) => any;
}
}
-23
View File
@@ -1,23 +0,0 @@
{
"compilerOptions": {
"module": "commonjs",
"lib": [
"es6",
"dom"
],
"noImplicitAny": true,
"noImplicitThis": true,
"strictNullChecks": false,
"baseUrl": "../",
"typeRoots": [
"../"
],
"types": [],
"noEmit": true,
"forceConsistentCasingInFileNames": true
},
"files": [
"index.d.ts",
"angular-cookie-tests.ts"
]
}
-90
View File
@@ -1,90 +0,0 @@
// Type definitions for Angular JS (ngCookies module) 1.4
// Project: http://angularjs.org
// Definitions by: Diego Vilar <http://github.com/diegovilar>, Anthony Ciccarello <http://github.com/aciccarello>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
declare var _: string;
export = _;
import * as angular from 'angular';
declare module 'angular' {
/**
* ngCookies module (angular-cookies.js)
*/
namespace cookies {
/**
* Cookies options
* see https://docs.angularjs.org/api/ngCookies/provider/$cookiesProvider#defaults
*/
interface ICookiesOptions {
/**
* The cookie will be available only for this path and its sub-paths.
* By default, this would be the URL that appears in your base tag.
*/
path?: string;
/**
* The cookie will be available only for this domain and its sub-domains.
* For obvious security reasons the user agent will not accept the cookie if the
* current domain is not a sub domain or equals to the requested domain.
*/
domain?: string;
/**
* String of the form "Wdy, DD Mon YYYY HH:MM:SS GMT" or a Date object
* indicating the exact date/time this cookie will expire.
*/
expires?: string | Date;
/**
* The cookie will be available only in secured connection.
*/
secure?: boolean;
}
/**
* CookieService
* see http://docs.angularjs.org/api/ngCookies.$cookies
*/
interface ICookiesService {
[index: string]: any;
}
/**
* CookieStoreService
* see http://docs.angularjs.org/api/ngCookies.$cookieStore
*/
interface ICookiesService {
get(key: string): string;
getObject(key: string): any;
getObject<T>(key: string): T;
getAll(): any;
put(key: string, value: string, options?: ICookiesOptions): void;
putObject(key: string, value: any, options?: ICookiesOptions): void;
remove(key: string, options?: ICookiesOptions): void;
}
/**
* CookieStoreService DEPRECATED
* see https://code.angularjs.org/1.2.26/docs/api/ngCookies/service/$cookieStore
*/
interface ICookieStoreService {
/**
* Returns the value of given cookie key
* @param key Id to use for lookup
*/
get(key: string): any;
/**
* Sets a value for given cookie key
* @param key Id for the value
* @param value Value to be stored
*/
put(key: string, value: any): void;
/**
* Remove given cookie
* @param key Id of the key-value pair to delete
*/
remove(key: string): void;
}
}
}
-22
View File
@@ -1,22 +0,0 @@
{
"files": [
"index.d.ts"
],
"compilerOptions": {
"module": "commonjs",
"lib": [
"es6",
"dom"
],
"noImplicitAny": true,
"noImplicitThis": true,
"strictNullChecks": false,
"baseUrl": "../",
"typeRoots": [
"../"
],
"types": [],
"noEmit": true,
"forceConsistentCasingInFileNames": true
}
}
-20
View File
@@ -1,20 +0,0 @@
// Type definitions for angular-deferred-bootstrap v0.1.9
// Project: https://github.com/philippd/angular-deferred-bootstrap
// Definitions by: Markus Wagner <https://github.com/Ritzlgrmft/>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
/// <reference types="angular" />
declare var deferredBootstrapper: angular.IDeferredBootstrapperStatic;
declare module angular {
interface IDeferredBootstrapperStatic {
bootstrap(configParam: IConfigParam): ng.IPromise<boolean>
}
interface IConfigParam {
element?: Node,
module?: string,
resolve: any
}
}

Some files were not shown because too many files have changed in this diff Show More