mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-08-07 09:49:07 +00:00
Merge remote-tracking branch 'upstream/master'
Conflicts: CONTRIBUTORS.md
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
# Contributors
|
||||
|
||||
This is a non-exhaustive list of definitions and their creators. If you created a definition but are not listed then feel free to send a pull request on this file with your name and url.
|
||||
This is a non-exhaustive list of definitions and their creators. If you created a definition but are not listed then feel free to send a pull request on this file with your name and url.
|
||||
|
||||
All definitions files include a header with the author and editors, so at some point this list will be auto-generated.
|
||||
|
||||
@@ -20,6 +20,7 @@ All definitions files include a header with the author and editors, so at some p
|
||||
* [assert](https://github.com/Jxck/assert) (by [vvakame](https://github.com/vvakame))
|
||||
* [async](https://github.com/caolan/async) (by [Boris Yankov](https://github.com/borisyankov))
|
||||
* [Atom](https://atom.io/) (by [vvakame](https://github.com/vvakame))
|
||||
* [aws-sdk-js](https://github.com/aws/aws-sdk-js) (by [midknight41](https://github.com/midknight41))
|
||||
* [Backbone.js](http://backbonejs.org/) (by [Boris Yankov](https://github.com/borisyankov))
|
||||
* [Backbone Relational](http://backbonerelational.org/) (by [Eirik Hoem](https://github.com/eirikhm))
|
||||
* [BigInteger](https://github.com/peterolson/BigInteger.js) (by [Ingo Bürk](https://github.com/Airblader))
|
||||
@@ -76,6 +77,7 @@ All definitions files include a header with the author and editors, so at some p
|
||||
* [Flight by Twitter](http://flightjs.github.com/flight/) (by [Jonathan Hedrén](https://github.com/jonathanhedren))
|
||||
* [Foundation](http://foundation.zurb.com/) (by [Boris Yankov](https://github.com/borisyankov))
|
||||
* [FPSMeter](http://darsa.in/fpsmeter/) (by [Aaron Lampros](https://github.com/alampros))
|
||||
* [fs-extra](https://github.com/jprichardson/node-fs-extra) (by [midknight41](https://github.com/midknight41))
|
||||
* [FullCalendar](http://arshaw.com/fullcalendar/) (by [Neil Stalker](https://github.com/nestalk))
|
||||
* [Gamepad](http://www.w3.org/TR/gamepad/) (by [Kon](http://phyzkit.net/))
|
||||
* [Giraffe](https://github.com/barc/backbone.giraffe) (by [Matt McCray](https://github.com/darthapo))
|
||||
@@ -107,6 +109,7 @@ All definitions files include a header with the author and editors, so at some p
|
||||
* [i18next](http://i18next.com/) (by [Maarten Docter](https://github.com/mdocter))
|
||||
* [iCheck](http://damirfoy.com/iCheck/) (by [Dániel Tar](https://github.com/qcz))
|
||||
* [Impress.js](https://github.com/bartaz/impress.js) (by [Boris Yankov](https://github.com/borisyankov))
|
||||
* [Imagemagick](http://github.com/rsms/node-imagemagick) (by [Carlos Ballesteros Velasco](https://github.com/soywiz))
|
||||
* [iScroll](http://cubiq.org/iscroll-4) (by [Boris Yankov](https://github.com/borisyankov) and [Christiaan Rakowski](https://github.com/csrakowski))
|
||||
* [IxJS (Interactive extensions)](https://github.com/Reactive-Extensions/IxJS) (by [Igor Oleinikov](https://github.com/Igorbek))
|
||||
* [jake](https://github.com/mde/jake) (by [Kon](http://phyzkit.net/))
|
||||
@@ -202,17 +205,22 @@ All definitions files include a header with the author and editors, so at some p
|
||||
* [Mousetrap](http://craig.is/killing/mice) (by [Dániel Tar](https://github.com/qcz))
|
||||
* [msgpack.js](https://github.com/uupaa/msgpack.js) (by [Shinya Mochizuki](https://github.com/enrapt-mochizuki))
|
||||
* [Mustache.js](https://github.com/janl/mustache.js) (by [Boris Yankov](https://github.com/borisyankov))
|
||||
* [nconf](https://github.com/flatiron/nconf) (by [Jeff Goddard](https://github.com/jedigo))
|
||||
* [noble](https://github.com/sandeepmistry/noble) (by [Seon-Wook Park](https://github.com/swook))
|
||||
* [nock](https://github.com/pgte/nock) (by [bonnici](https://github.com/bonnici))
|
||||
* [Node.js](http://nodejs.org/) (from TypeScript samples)
|
||||
* [node_redis](https://github.com/mranney/node_redis) (by [Boris Yankov](https://github.com/borisyankov))
|
||||
* [node-ffi](https://github.com/rbranson/node-ffi) (by [Paul Loyd](https://github.com/loyd))
|
||||
* [node-git](https://github.com/christkv/node-git) (by [vvakame](https://github.com/vvakame))
|
||||
* [nodeunit](https://github.com/caolan/nodeunit) (by [Jeff Goddard](https://github.com/jedigo))
|
||||
* [node_zeromq](https://github.com/JustinTulloss/zeromq.node) (by [Dave McKeown](https://github.com/davemckeown))
|
||||
* [node-sqlserver](https://github.com/WindowsAzure/node-sqlserver) (by [Boris Yankov](https://github.com/borisyankov))
|
||||
* [node-uuid](https://github.com/broofa/node-uuid) (by [Jeff May](https://github.com/jeffmay))
|
||||
* [notify.js](https://github.com/alexgibson/notify.js) (by [soundTricker](https://github.com/soundTricker))
|
||||
* [NProgress](https://github.com/rstacruz/nprogress) (by [Judah Gabriel Himango](https://github.com/judahgabriel))
|
||||
* [Numeral.js](https://github.com/adamwdraper/Numeral-js) (by [Vincent Bortone](https://github.com/vbortone/))
|
||||
* [OpenLayers](https://github.com/openlayers/openlayers) (by [Ilya Bolkhovsky](https://github.com/bolhovsky/))
|
||||
* [Optimist](https://github.com/substack/node-optimist) (by [Carlos Ballesteros Velasco](https://github.com/soywiz))
|
||||
* [Passport](http://passportjs.org/) (by [Hiroki Horiuchi](https://github.com/horiuchi/))
|
||||
* [pathwatcher](http://atom.github.io/node-pathwatcher/) (by [vvakame](https://github.com/vvakame))
|
||||
* [Parallel.js](https://github.com/adambom/parallel.js) (by [Josh Baldwin](https://github.com/jbaldwin))
|
||||
@@ -233,6 +241,8 @@ All definitions files include a header with the author and editors, so at some p
|
||||
* [Rickshaw](http://code.shutterstock.com/rickshaw/) (by [Blake Niemyjski](https://github.com/niemyjski))
|
||||
* [Riot.js](https://github.com/moot/riotjs) (by [vvakame](https://github.com/vvakame))
|
||||
* [Restify](https://github.com/mcavage/node-restify) (by [Bret Little](https://github.com/blittle))
|
||||
* [Redis](https://github.com/mranney/node_redis) (by [Carlos Ballesteros Velasco](https://github.com/soywiz))
|
||||
* [Request](https://github.com/mikeal/request) (by [Carlos Ballesteros Velasco](https://github.com/soywiz))
|
||||
* [Royalslider](http://dimsemenov.com/plugins/royal-slider/) (by [Christiaan Rakowski](https://github.com/csrakowski))
|
||||
* [Rx.js](http://rx.codeplex.com/) (by [gsino](http://www.codeplex.com/site/users/view/gsino), [Igor Oleinikov](https://github.com/Igorbek), [Carl de Billy](http://carl.debilly.net/), [zoetrope](https://github.com/zoetrope))
|
||||
* [Raphael](http://raphaeljs.com/) (by [CheCoxshall](https://github.com/CheCoxshall))
|
||||
@@ -259,6 +269,7 @@ All definitions files include a header with the author and editors, so at some p
|
||||
* [Sugar](http://sugarjs.com/) (by [Josh Baldwin](https://github.com/jbaldwin/))
|
||||
* [Swiper](http://www.idangero.us/sliders/swiper) (by [Sebastián Galiano](https://github.com/sgaliano))
|
||||
* [SwipeView](http://cubiq.org/swipeview) (by [Boris Yankov](https://github.com/borisyankov))
|
||||
* [Swiz](https://github.com/racker/node-swiz) (by [Jeff Goddard](https://github.com/jedigo))
|
||||
* [TV4](https://github.com/geraintluff/tv4) (by [Bart van der Schoor](https://github.com/Bartvds))
|
||||
* [Tags Manager](http://welldonethings.com/tags/manager) (by [Vincent Bortone](https://github.com/vbortone))
|
||||
* [Teechart](http://www.steema.com) (by [Steema](http://www.steema.com))
|
||||
|
||||
25
atpl/atpl-tests.ts
Normal file
25
atpl/atpl-tests.ts
Normal file
@@ -0,0 +1,25 @@
|
||||
/// <reference path="atpl.d.ts" />
|
||||
|
||||
import atpl = require('atpl');
|
||||
|
||||
var bool: boolean;
|
||||
var str: string;
|
||||
var err: Error;
|
||||
var items: any;
|
||||
var options: Object;
|
||||
var callback: Function;
|
||||
|
||||
atpl.compile(str, options);
|
||||
atpl.__express(str, options, callback);
|
||||
|
||||
atpl.registerExtension(items);
|
||||
atpl.registerTags(items);
|
||||
atpl.registerFunctions(items);
|
||||
atpl.registerFilters(items);
|
||||
atpl.registerTests(items);
|
||||
|
||||
atpl.registerTags(null);
|
||||
atpl.renderFile(str, str, options, bool, (e, res?) => {
|
||||
err = err;
|
||||
str = res;
|
||||
});
|
||||
20
atpl/atpl.d.ts
vendored
Normal file
20
atpl/atpl.d.ts
vendored
Normal file
@@ -0,0 +1,20 @@
|
||||
// Type definitions for atpl
|
||||
// Project: https://github.com/soywiz/atpl.js
|
||||
// Definitions by: Carlos Ballesteros Velasco <https://github.com/soywiz>
|
||||
// Definitions: https://github.com/borisyankov/DefinitelyTyped
|
||||
|
||||
// Imported from: https://github.com/soywiz/typescript-node-definitions/atpl.d.ts
|
||||
|
||||
declare module "atpl" {
|
||||
export function compile(templateString: string, options: any): (context:any) => string;
|
||||
export function __express(filename: string, options: any, callback: Function): any;
|
||||
|
||||
export function registerExtension(items: any): void;
|
||||
export function registerTags(items: any): void;
|
||||
export function registerFunctions(items: any): void;
|
||||
export function registerFilters(items: any): void;
|
||||
export function registerTests(items: any): void;
|
||||
|
||||
export function renderFileSync(viewsPath: string, filename: string, parameters: any, cache: boolean ): string;
|
||||
export function renderFile(viewsPath: string, filename: string, parameters: any, cache: boolean, done: (err: Error, result?: string) => void): void;
|
||||
}
|
||||
13
aws-sdk/aws-sdk-tests.ts
Normal file
13
aws-sdk/aws-sdk-tests.ts
Normal file
@@ -0,0 +1,13 @@
|
||||
/// <reference path="aws-sdk.d.ts" />
|
||||
|
||||
import awsSdk = require('aws-sdk');
|
||||
|
||||
var str: string;
|
||||
|
||||
var creds: awsSdk.Credentials;
|
||||
|
||||
creds = new awsSdk.Credentials(str, str);
|
||||
creds = new awsSdk.Credentials(str, str, str);
|
||||
str = creds.accessKeyId;
|
||||
|
||||
// more
|
||||
909
aws-sdk/aws-sdk.d.ts
vendored
Normal file
909
aws-sdk/aws-sdk.d.ts
vendored
Normal file
@@ -0,0 +1,909 @@
|
||||
// Type definitions for aws-sdk
|
||||
// Project: https://github.com/aws/aws-sdk-js
|
||||
// Definitions by: midknight41 <https://github.com/midknight41>
|
||||
// Definitions: https://github.com/borisyankov/DefinitelyTyped
|
||||
|
||||
// Imported from: https://github.com/soywiz/typescript-node-definitions/aws-sdk.d.ts
|
||||
|
||||
/// <reference path="../node/node.d.ts" />
|
||||
|
||||
declare module "aws-sdk" {
|
||||
|
||||
export var config: ClientConfig;
|
||||
|
||||
export function Config(json: any): void;
|
||||
|
||||
export class Credentials {
|
||||
constructor(accessKeyId: string, secretAccessKey: string, sessionToken?: string);
|
||||
accessKeyId: string;
|
||||
}
|
||||
|
||||
export interface ClientConfig {
|
||||
credentials: Credentials;
|
||||
region: string;
|
||||
}
|
||||
|
||||
export class SQS {
|
||||
constructor(options?: any);
|
||||
public client: Sqs.Client;
|
||||
}
|
||||
|
||||
export class SES {
|
||||
constructor(options?: any);
|
||||
public client: Ses.Client;
|
||||
}
|
||||
|
||||
export class SNS {
|
||||
constructor(options?: any);
|
||||
public client: Sns.Client;
|
||||
}
|
||||
|
||||
export class SimpleWorkflow {
|
||||
constructor(options?: any);
|
||||
public client: Swf.Client;
|
||||
}
|
||||
|
||||
export class S3 {
|
||||
constructor(options?: any);
|
||||
public client: s3.Client;
|
||||
}
|
||||
|
||||
export module Sqs {
|
||||
|
||||
export interface Client {
|
||||
config: ClientConfig;
|
||||
|
||||
sendMessage(params: SendMessageRequest, callback: (err: any, data: SendMessageResult) => void): void;
|
||||
sendMessageBatch(params: SendMessageBatchRequest, callback: (err: any, data: SendMessageBatchResult) => void): void;
|
||||
receiveMessage(params: ReceiveMessageRequest, callback: (err: any, data: ReceiveMessageResult) => void): void;
|
||||
deleteMessage(params: DeleteMessageRequest, callback: (err: any, data: any) => void): void;
|
||||
deleteMessageBatch(params: DeleteMessageBatchRequest, callback: (err: any, data: DeleteMessageBatchResult) => void): void;
|
||||
createQueue(params: CreateQueueRequest, callback: (err: any, data: CreateQueueResult) => void): void;
|
||||
deleteQueue(params: DeleteQueueRequest, callback: (err: any, data: any) => void): void;
|
||||
}
|
||||
|
||||
export interface SendMessageRequest {
|
||||
QueueUrl?: string;
|
||||
MessageBody?: string;
|
||||
DelaySeconds?: number;
|
||||
}
|
||||
|
||||
export interface ReceiveMessageRequest {
|
||||
QueueUrl?: string;
|
||||
MaxNumberOfMessages?: number;
|
||||
VisibilityTimeout?: number;
|
||||
AttributeNames?: string[];
|
||||
}
|
||||
|
||||
export interface DeleteMessageBatchRequest {
|
||||
QueueUrl?: string;
|
||||
Entries?: DeleteMessageBatchRequestEntry[];
|
||||
}
|
||||
|
||||
export interface DeleteMessageBatchRequestEntry {
|
||||
Id: string;
|
||||
ReceiptHandle: string;
|
||||
}
|
||||
|
||||
export interface DeleteMessageRequest {
|
||||
QueueUrl?: string;
|
||||
ReceiptHandle?: string;
|
||||
}
|
||||
|
||||
export class Attribute {
|
||||
Name: string;
|
||||
Value: string;
|
||||
}
|
||||
|
||||
export interface SendMessageBatchRequest {
|
||||
QueueUrl?: string;
|
||||
Entries?: SendMessageBatchRequestEntry[];
|
||||
}
|
||||
|
||||
export class SendMessageBatchRequestEntry {
|
||||
Id: string;
|
||||
MessageBody: string;
|
||||
DelaySeconds: number;
|
||||
}
|
||||
|
||||
export interface CreateQueueRequest {
|
||||
QueueName?: string;
|
||||
DefaultVisibilityTimeout?: number;
|
||||
DelaySeconds?: number;
|
||||
Attributes?: Attribute[];
|
||||
}
|
||||
|
||||
export interface DeleteQueueRequest {
|
||||
QueueUrl?: string;
|
||||
}
|
||||
|
||||
export class SendMessageResult {
|
||||
MessageId: string;
|
||||
MD5OfMessageBody: string;
|
||||
}
|
||||
|
||||
export class ReceiveMessageResult {
|
||||
Messages: Message[];
|
||||
}
|
||||
|
||||
export class Message {
|
||||
MessageId: string;
|
||||
ReceiptHandle: string;
|
||||
MD5OfBody: string;
|
||||
Body: string;
|
||||
Attributes: Attribute[];
|
||||
}
|
||||
|
||||
export class DeleteMessageBatchResult {
|
||||
Successful: DeleteMessageBatchResultEntry[];
|
||||
Failed: BatchResultErrorEntry[];
|
||||
}
|
||||
|
||||
export class DeleteMessageBatchResultEntry {
|
||||
Id: string;
|
||||
}
|
||||
|
||||
export class BatchResultErrorEntry {
|
||||
Id: string;
|
||||
Code: string;
|
||||
Message: string;
|
||||
SenderFault: string;
|
||||
}
|
||||
|
||||
export class SendMessageBatchResult {
|
||||
Successful: SendMessageBatchResultEntry[];
|
||||
Failed: BatchResultErrorEntry[];
|
||||
}
|
||||
|
||||
export class SendMessageBatchResultEntry {
|
||||
Id: string;
|
||||
MessageId: string;
|
||||
MD5OfMessageBody: string;
|
||||
}
|
||||
|
||||
export class CreateQueueResult {
|
||||
QueueUrl: string;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
export module Ses {
|
||||
|
||||
export interface Client {
|
||||
config: ClientConfig;
|
||||
|
||||
sendEmail(params: any, callback: (err: any, data: SendEmailResult) => void): void;
|
||||
}
|
||||
|
||||
export interface SendEmailRequest {
|
||||
Source: string;
|
||||
Destination: Destination;
|
||||
Message: Message;
|
||||
ReplyToAddresses: string[];
|
||||
ReturnPath: string;
|
||||
}
|
||||
|
||||
export class Destination {
|
||||
ToAddresses: string[];
|
||||
CcAddresses: string[];
|
||||
BccAddresses: string[];
|
||||
}
|
||||
|
||||
export class Message {
|
||||
Subject: Content;
|
||||
Body: Body;
|
||||
}
|
||||
|
||||
export class Content {
|
||||
Data: string;
|
||||
Charset: string;
|
||||
}
|
||||
|
||||
export class Body {
|
||||
Text: Content;
|
||||
Html: Content;
|
||||
}
|
||||
|
||||
export class SendEmailResult {
|
||||
MessageId: string;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
export module Swf {
|
||||
|
||||
export class Client {
|
||||
//constructor(options?: any);
|
||||
public config: ClientConfig;
|
||||
|
||||
countClosedWorkflowExecutions(params: any, callback: (err: any, data: any) => void): void;
|
||||
countOpenWorkflowExecutions(params: any, callback: (err: any, data: any) => void): void;
|
||||
countPendingActivityTasks(params: any, callback: (err: any, data: any) => void): void;
|
||||
countPendingDecisionTasks(params: any, callback: (err: any, data: any) => void): void;
|
||||
deprecateActivityType(params: any, callback: (err: any, data: any) => void): void;
|
||||
deprecateDomain(params: any, callback: (err: any, data: any) => void): void;
|
||||
deprecateWorkflowType(params: any, callback: (err: any, data: any) => void): void;
|
||||
describeActivityType(params: any, callback: (err: any, data: any) => void): void;
|
||||
describeDomain(params: any, callback: (err: any, data: any) => void): void;
|
||||
describeWorkflowExecution(params: any, callback: (err: any, data: any) => void): void;
|
||||
describeWorkflowType(params: any, callback: (err: any, data: any) => void): void;
|
||||
getWorkflowExecutionHistory(params: any, callback: (err: any, data: any) => void): void;
|
||||
listActivityTypes(params: any, callback: (err: any, data: any) => void): void;
|
||||
listClosedWorkflowExecutions(params: any, callback: (err: any, data: any) => void): void;
|
||||
listDomains(params: any, callback: (err: any, data: any) => void): void;
|
||||
listOpenWorkflowExecutions(params: any, callback: (err: any, data: any) => void): void;
|
||||
listWorkflowTypes(params: any, callback: (err: any, data: any) => void): void;
|
||||
pollForActivityTask(params: any, callback: (err: any, data: ActivityTask) => void): void;
|
||||
pollForDecisionTask(params: any, callback: (err: any, data: DecisionTask) => void): void;
|
||||
recordActivityTaskHeartbeat(params: any, callback: (err: any, data: any) => void): void;
|
||||
registerActivityType(params: any, callback: (err: any, data: any) => void): void;
|
||||
registerDomain(params: any, callback: (err: any, data: any) => void): void;
|
||||
registerWorkflowType(params: any, callback: (err: any, data: any) => void): void;
|
||||
requestCancelWorkflowExecution(params: any, callback: (err: any, data: any) => void): void;
|
||||
respondActivityTaskCanceled(params: RespondActivityTaskCanceledRequest, callback: (err: any, data: any) => void): void;
|
||||
respondActivityTaskCompleted(params: RespondActivityTaskCompletedRequest, callback: (err: any, data: any) => void): void;
|
||||
respondActivityTaskFailed(params: RespondActivityTaskFailedRequest, callback: (err: any, data: any) => void): void;
|
||||
respondDecisionTaskCompleted(params: RespondDecisionTaskCompletedRequest, callback: (err: any, data: any) => void): void;
|
||||
signalWorkflowExecution(params: any, callback: (err: any, data: any) => void): void;
|
||||
startWorkflowExecution(params: any, callback: (err: any, data: StartWorkflowExecutionResult) => void): void;
|
||||
terminateWorkflowExecution(params: any, callback: (err: any, data: any) => void): void;
|
||||
}
|
||||
|
||||
export interface PollForActivityTaskRequest {
|
||||
domain?: string;
|
||||
taskList?: TaskList;
|
||||
identity?: string;
|
||||
}
|
||||
|
||||
export interface TaskList {
|
||||
name?: string;
|
||||
}
|
||||
|
||||
export interface PollForDecisionTaskRequest {
|
||||
domain?: string;
|
||||
taskList?: TaskList;
|
||||
identity?: string;
|
||||
nextPageToken?: string;
|
||||
maximumPageSize?: number;
|
||||
reverseOrder?: Boolean;
|
||||
}
|
||||
|
||||
export interface StartWorkflowExecutionRequest {
|
||||
domain?: string;
|
||||
workflowId?: string;
|
||||
workflowType?: WorkflowType;
|
||||
taskList?: TaskList;
|
||||
input?: string;
|
||||
executionStartToCloseTimeout?: string;
|
||||
tagList?: string[];
|
||||
taskStartToCloseTimeout?: string;
|
||||
childPolicy?: string;
|
||||
}
|
||||
|
||||
export interface WorkflowType {
|
||||
name?: string;
|
||||
version?: string;
|
||||
}
|
||||
|
||||
export interface RespondDecisionTaskCompletedRequest {
|
||||
taskToken?: string;
|
||||
decisions?: Decision[];
|
||||
executionContext?: string;
|
||||
}
|
||||
|
||||
export interface Decision {
|
||||
decisionType?: string;
|
||||
scheduleActivityTaskDecisionAttributes?: ScheduleActivityTaskDecisionAttributes;
|
||||
requestCancelActivityTaskDecisionAttributes?: RequestCancelActivityTaskDecisionAttributes;
|
||||
completeWorkflowExecutionDecisionAttributes?: CompleteWorkflowExecutionDecisionAttributes;
|
||||
failWorkflowExecutionDecisionAttributes?: FailWorkflowExecutionDecisionAttributes;
|
||||
cancelWorkflowExecutionDecisionAttributes?: CancelWorkflowExecutionDecisionAttributes;
|
||||
continueAsNewWorkflowExecutionDecisionAttributes?: ContinueAsNewWorkflowExecutionDecisionAttributes;
|
||||
recordMarkerDecisionAttributes?: RecordMarkerDecisionAttributes;
|
||||
startTimerDecisionAttributes?: StartTimerDecisionAttributes;
|
||||
cancelTimerDecisionAttributes?: CancelTimerDecisionAttributes;
|
||||
signalExternalWorkflowExecutionDecisionAttributes?: SignalExternalWorkflowExecutionDecisionAttributes;
|
||||
requestCancelExternalWorkflowExecutionDecisionAttributes?: RequestCancelExternalWorkflowExecutionDecisionAttributes;
|
||||
startChildWorkflowExecutionDecisionAttributes?: StartChildWorkflowExecutionDecisionAttributes;
|
||||
}
|
||||
|
||||
export interface ScheduleActivityTaskDecisionAttributes {
|
||||
activityType?: ActivityType;
|
||||
activityId?: string;
|
||||
control?: string;
|
||||
input?: string;
|
||||
scheduleToCloseTimeout?: string;
|
||||
taskList?: TaskList;
|
||||
scheduleToStartTimeout?: string;
|
||||
startToCloseTimeout?: string;
|
||||
heartbeatTimeout?: string;
|
||||
}
|
||||
|
||||
export interface ActivityType {
|
||||
name?: string;
|
||||
version?: string;
|
||||
}
|
||||
|
||||
export interface RequestCancelActivityTaskDecisionAttributes {
|
||||
activityId?: string;
|
||||
}
|
||||
|
||||
export interface CompleteWorkflowExecutionDecisionAttributes {
|
||||
result?: string;
|
||||
}
|
||||
|
||||
export interface FailWorkflowExecutionDecisionAttributes {
|
||||
reason?: string;
|
||||
details?: string;
|
||||
}
|
||||
|
||||
export interface CancelWorkflowExecutionDecisionAttributes {
|
||||
details?: string;
|
||||
}
|
||||
|
||||
export interface ContinueAsNewWorkflowExecutionDecisionAttributes {
|
||||
input?: string;
|
||||
executionStartToCloseTimeout?: string;
|
||||
taskList?: TaskList;
|
||||
taskStartToCloseTimeout?: string;
|
||||
childPolicy?: string;
|
||||
tagList?: string[];
|
||||
workflowTypeVersion?: string;
|
||||
}
|
||||
|
||||
export interface RecordMarkerDecisionAttributes {
|
||||
markerName?: string;
|
||||
details?: string;
|
||||
}
|
||||
|
||||
export interface StartTimerDecisionAttributes {
|
||||
timerId?: string;
|
||||
control?: string;
|
||||
startToFireTimeout?: string;
|
||||
}
|
||||
|
||||
export interface CancelTimerDecisionAttributes {
|
||||
timerId?: string;
|
||||
}
|
||||
|
||||
export interface SignalExternalWorkflowExecutionDecisionAttributes {
|
||||
workflowId?: string;
|
||||
runId?: string;
|
||||
signalName?: string;
|
||||
input?: string;
|
||||
control?: string;
|
||||
}
|
||||
|
||||
export interface RequestCancelExternalWorkflowExecutionDecisionAttributes {
|
||||
workflowId?: string;
|
||||
runId?: string;
|
||||
control?: string;
|
||||
}
|
||||
|
||||
export interface StartChildWorkflowExecutionDecisionAttributes {
|
||||
workflowType?: WorkflowType;
|
||||
workflowId?: string;
|
||||
control?: string;
|
||||
input?: string;
|
||||
executionStartToCloseTimeout?: string;
|
||||
taskList?: TaskList;
|
||||
taskStartToCloseTimeout?: string;
|
||||
childPolicy?: string;
|
||||
tagList?: string[];
|
||||
}
|
||||
|
||||
export interface RespondActivityTaskCompletedRequest {
|
||||
taskToken?: string;
|
||||
result?: string;
|
||||
}
|
||||
|
||||
export interface RespondActivityTaskFailedRequest {
|
||||
taskToken?: string;
|
||||
reason?: string;
|
||||
details?: string;
|
||||
}
|
||||
|
||||
export interface RespondActivityTaskCanceledRequest {
|
||||
taskToken?: string;
|
||||
details?: string;
|
||||
}
|
||||
|
||||
export interface DecisionTask {
|
||||
taskToken?: string;
|
||||
startedEventId?: number;
|
||||
workflowExecution?: WorkflowExecution;
|
||||
workflowType?: WorkflowType;
|
||||
events?: HistoryEvent[];
|
||||
nextPageToken?: string;
|
||||
previousStartedEventId?: number;
|
||||
}
|
||||
|
||||
export interface WorkflowExecution {
|
||||
workflowId?: string;
|
||||
runId?: string;
|
||||
}
|
||||
|
||||
export interface HistoryEvent {
|
||||
eventTimestamp?: any;
|
||||
eventType?: string;
|
||||
eventId?: number;
|
||||
workflowExecutionStartedEventAttributes?: WorkflowExecutionStartedEventAttributes;
|
||||
workflowExecutionCompletedEventAttributes?: WorkflowExecutionCompletedEventAttributes;
|
||||
completeWorkflowExecutionFailedEventAttributes?: CompleteWorkflowExecutionFailedEventAttributes;
|
||||
workflowExecutionFailedEventAttributes?: WorkflowExecutionFailedEventAttributes;
|
||||
failWorkflowExecutionFailedEventAttributes?: FailWorkflowExecutionFailedEventAttributes;
|
||||
workflowExecutionTimedOutEventAttributes?: WorkflowExecutionTimedOutEventAttributes;
|
||||
workflowExecutionCanceledEventAttributes?: WorkflowExecutionCanceledEventAttributes;
|
||||
cancelWorkflowExecutionFailedEventAttributes?: CancelWorkflowExecutionFailedEventAttributes;
|
||||
workflowExecutionContinuedAsNewEventAttributes?: WorkflowExecutionContinuedAsNewEventAttributes;
|
||||
continueAsNewWorkflowExecutionFailedEventAttributes?: ContinueAsNewWorkflowExecutionFailedEventAttributes;
|
||||
workflowExecutionTerminatedEventAttributes?: WorkflowExecutionTerminatedEventAttributes;
|
||||
workflowExecutionCancelRequestedEventAttributes?: WorkflowExecutionCancelRequestedEventAttributes;
|
||||
decisionTaskScheduledEventAttributes?: DecisionTaskScheduledEventAttributes;
|
||||
decisionTaskStartedEventAttributes?: DecisionTaskStartedEventAttributes;
|
||||
decisionTaskCompletedEventAttributes?: DecisionTaskCompletedEventAttributes;
|
||||
decisionTaskTimedOutEventAttributes?: DecisionTaskTimedOutEventAttributes;
|
||||
activityTaskScheduledEventAttributes?: ActivityTaskScheduledEventAttributes;
|
||||
activityTaskStartedEventAttributes?: ActivityTaskStartedEventAttributes;
|
||||
activityTaskCompletedEventAttributes?: ActivityTaskCompletedEventAttributes;
|
||||
activityTaskFailedEventAttributes?: ActivityTaskFailedEventAttributes;
|
||||
activityTaskTimedOutEventAttributes?: ActivityTaskTimedOutEventAttributes;
|
||||
activityTaskCanceledEventAttributes?: ActivityTaskCanceledEventAttributes;
|
||||
activityTaskCancelRequestedEventAttributes?: ActivityTaskCancelRequestedEventAttributes;
|
||||
workflowExecutionSignaledEventAttributes?: WorkflowExecutionSignaledEventAttributes;
|
||||
markerRecordedEventAttributes?: MarkerRecordedEventAttributes;
|
||||
timerStartedEventAttributes?: TimerStartedEventAttributes;
|
||||
timerFiredEventAttributes?: TimerFiredEventAttributes;
|
||||
timerCanceledEventAttributes?: TimerCanceledEventAttributes;
|
||||
startChildWorkflowExecutionInitiatedEventAttributes?: StartChildWorkflowExecutionInitiatedEventAttributes;
|
||||
childWorkflowExecutionStartedEventAttributes?: ChildWorkflowExecutionStartedEventAttributes;
|
||||
childWorkflowExecutionCompletedEventAttributes?: ChildWorkflowExecutionCompletedEventAttributes;
|
||||
childWorkflowExecutionFailedEventAttributes?: ChildWorkflowExecutionFailedEventAttributes;
|
||||
childWorkflowExecutionTimedOutEventAttributes?: ChildWorkflowExecutionTimedOutEventAttributes;
|
||||
childWorkflowExecutionCanceledEventAttributes?: ChildWorkflowExecutionCanceledEventAttributes;
|
||||
childWorkflowExecutionTerminatedEventAttributes?: ChildWorkflowExecutionTerminatedEventAttributes;
|
||||
signalExternalWorkflowExecutionInitiatedEventAttributes?: SignalExternalWorkflowExecutionInitiatedEventAttributes;
|
||||
externalWorkflowExecutionSignaledEventAttributes?: ExternalWorkflowExecutionSignaledEventAttributes;
|
||||
signalExternalWorkflowExecutionFailedEventAttributes?: SignalExternalWorkflowExecutionFailedEventAttributes;
|
||||
externalWorkflowExecutionCancelRequestedEventAttributes?: ExternalWorkflowExecutionCancelRequestedEventAttributes;
|
||||
requestCancelExternalWorkflowExecutionInitiatedEventAttributes?: RequestCancelExternalWorkflowExecutionInitiatedEventAttributes;
|
||||
requestCancelExternalWorkflowExecutionFailedEventAttributes?: RequestCancelExternalWorkflowExecutionFailedEventAttributes;
|
||||
scheduleActivityTaskFailedEventAttributes?: ScheduleActivityTaskFailedEventAttributes;
|
||||
requestCancelActivityTaskFailedEventAttributes?: RequestCancelActivityTaskFailedEventAttributes;
|
||||
startTimerFailedEventAttributes?: StartTimerFailedEventAttributes;
|
||||
cancelTimerFailedEventAttributes?: CancelTimerFailedEventAttributes;
|
||||
startChildWorkflowExecutionFailedEventAttributes?: StartChildWorkflowExecutionFailedEventAttributes;
|
||||
}
|
||||
|
||||
export interface WorkflowExecutionStartedEventAttributes {
|
||||
input?: string;
|
||||
executionStartToCloseTimeout?: string;
|
||||
taskStartToCloseTimeout?: string;
|
||||
childPolicy?: string;
|
||||
taskList?: TaskList;
|
||||
workflowType?: WorkflowType;
|
||||
tagList?: string[];
|
||||
continuedExecutionRunId?: string;
|
||||
parentWorkflowExecution?: WorkflowExecution;
|
||||
parentInitiatedEventId?: number;
|
||||
}
|
||||
|
||||
export interface WorkflowExecutionCompletedEventAttributes {
|
||||
result?: string;
|
||||
decisionTaskCompletedEventId?: number;
|
||||
}
|
||||
|
||||
export interface CompleteWorkflowExecutionFailedEventAttributes {
|
||||
cause?: string;
|
||||
decisionTaskCompletedEventId?: number;
|
||||
}
|
||||
|
||||
export interface WorkflowExecutionFailedEventAttributes {
|
||||
reason?: string;
|
||||
details?: string;
|
||||
decisionTaskCompletedEventId?: number;
|
||||
}
|
||||
|
||||
export interface FailWorkflowExecutionFailedEventAttributes {
|
||||
cause?: string;
|
||||
decisionTaskCompletedEventId?: number;
|
||||
}
|
||||
|
||||
export interface WorkflowExecutionTimedOutEventAttributes {
|
||||
timeoutType?: string;
|
||||
childPolicy?: string;
|
||||
}
|
||||
|
||||
export interface WorkflowExecutionCanceledEventAttributes {
|
||||
details?: string;
|
||||
decisionTaskCompletedEventId?: number;
|
||||
}
|
||||
|
||||
export interface CancelWorkflowExecutionFailedEventAttributes {
|
||||
cause?: string;
|
||||
decisionTaskCompletedEventId?: number;
|
||||
}
|
||||
|
||||
export interface WorkflowExecutionContinuedAsNewEventAttributes {
|
||||
input?: string;
|
||||
decisionTaskCompletedEventId?: number;
|
||||
newExecutionRunId?: string;
|
||||
executionStartToCloseTimeout?: string;
|
||||
taskList?: TaskList;
|
||||
taskStartToCloseTimeout?: string;
|
||||
childPolicy?: string;
|
||||
tagList?: string[];
|
||||
workflowType?: WorkflowType;
|
||||
}
|
||||
|
||||
export interface ContinueAsNewWorkflowExecutionFailedEventAttributes {
|
||||
cause?: string;
|
||||
decisionTaskCompletedEventId?: number;
|
||||
}
|
||||
|
||||
export interface WorkflowExecutionTerminatedEventAttributes {
|
||||
reason?: string;
|
||||
details?: string;
|
||||
childPolicy?: string;
|
||||
cause?: string;
|
||||
}
|
||||
|
||||
export interface WorkflowExecutionCancelRequestedEventAttributes {
|
||||
externalWorkflowExecution?: WorkflowExecution;
|
||||
externalInitiatedEventId?: number;
|
||||
cause?: string;
|
||||
}
|
||||
|
||||
export interface DecisionTaskScheduledEventAttributes {
|
||||
taskList?: TaskList;
|
||||
startToCloseTimeout?: string;
|
||||
}
|
||||
|
||||
export interface DecisionTaskStartedEventAttributes {
|
||||
identity?: string;
|
||||
scheduledEventId?: number;
|
||||
}
|
||||
|
||||
export interface DecisionTaskCompletedEventAttributes {
|
||||
executionContext?: string;
|
||||
scheduledEventId?: number;
|
||||
startedEventId?: number;
|
||||
}
|
||||
|
||||
export interface DecisionTaskTimedOutEventAttributes {
|
||||
timeoutType?: string;
|
||||
scheduledEventId?: number;
|
||||
startedEventId?: number;
|
||||
}
|
||||
|
||||
export interface ActivityTaskScheduledEventAttributes {
|
||||
activityType?: ActivityType;
|
||||
activityId?: string;
|
||||
input?: string;
|
||||
control?: string;
|
||||
scheduleToStartTimeout?: string;
|
||||
scheduleToCloseTimeout?: string;
|
||||
startToCloseTimeout?: string;
|
||||
taskList?: TaskList;
|
||||
decisionTaskCompletedEventId?: number;
|
||||
heartbeatTimeout?: string;
|
||||
}
|
||||
|
||||
export interface ActivityTaskStartedEventAttributes {
|
||||
identity?: string;
|
||||
scheduledEventId?: number;
|
||||
}
|
||||
|
||||
export interface ActivityTaskCompletedEventAttributes {
|
||||
result?: string;
|
||||
scheduledEventId?: number;
|
||||
startedEventId?: number;
|
||||
}
|
||||
|
||||
export interface ActivityTaskFailedEventAttributes {
|
||||
reason?: string;
|
||||
details?: string;
|
||||
scheduledEventId?: number;
|
||||
startedEventId?: number;
|
||||
}
|
||||
|
||||
export interface ActivityTaskTimedOutEventAttributes {
|
||||
timeoutType?: string;
|
||||
scheduledEventId?: number;
|
||||
startedEventId?: number;
|
||||
details?: string;
|
||||
}
|
||||
|
||||
export interface ActivityTaskCanceledEventAttributes {
|
||||
details?: string;
|
||||
scheduledEventId?: number;
|
||||
startedEventId?: number;
|
||||
latestCancelRequestedEventId?: number;
|
||||
}
|
||||
|
||||
export interface ActivityTaskCancelRequestedEventAttributes {
|
||||
decisionTaskCompletedEventId?: number;
|
||||
activityId?: string;
|
||||
}
|
||||
|
||||
export interface WorkflowExecutionSignaledEventAttributes {
|
||||
signalName?: string;
|
||||
input?: string;
|
||||
externalWorkflowExecution?: WorkflowExecution;
|
||||
externalInitiatedEventId?: number;
|
||||
}
|
||||
|
||||
export interface MarkerRecordedEventAttributes {
|
||||
markerName?: string;
|
||||
details?: string;
|
||||
decisionTaskCompletedEventId?: number;
|
||||
}
|
||||
|
||||
export interface TimerStartedEventAttributes {
|
||||
timerId?: string;
|
||||
control?: string;
|
||||
startToFireTimeout?: string;
|
||||
decisionTaskCompletedEventId?: number;
|
||||
}
|
||||
|
||||
export interface TimerFiredEventAttributes {
|
||||
timerId?: string;
|
||||
startedEventId?: number;
|
||||
}
|
||||
|
||||
export interface TimerCanceledEventAttributes {
|
||||
timerId?: string;
|
||||
startedEventId?: number;
|
||||
decisionTaskCompletedEventId?: number;
|
||||
}
|
||||
|
||||
export interface StartChildWorkflowExecutionInitiatedEventAttributes {
|
||||
workflowId?: string;
|
||||
workflowType?: WorkflowType;
|
||||
control?: string;
|
||||
input?: string;
|
||||
executionStartToCloseTimeout?: string;
|
||||
taskList?: TaskList;
|
||||
decisionTaskCompletedEventId?: number;
|
||||
childPolicy?: string;
|
||||
taskStartToCloseTimeout?: string;
|
||||
tagList?: string[];
|
||||
}
|
||||
|
||||
export interface ChildWorkflowExecutionStartedEventAttributes {
|
||||
workflowExecution?: WorkflowExecution;
|
||||
workflowType?: WorkflowType;
|
||||
initiatedEventId?: number;
|
||||
}
|
||||
|
||||
export interface ChildWorkflowExecutionCompletedEventAttributes {
|
||||
workflowExecution?: WorkflowExecution;
|
||||
workflowType?: WorkflowType;
|
||||
result?: string;
|
||||
initiatedEventId?: number;
|
||||
startedEventId?: number;
|
||||
}
|
||||
|
||||
export interface ChildWorkflowExecutionFailedEventAttributes {
|
||||
workflowExecution?: WorkflowExecution;
|
||||
workflowType?: WorkflowType;
|
||||
reason?: string;
|
||||
details?: string;
|
||||
initiatedEventId?: number;
|
||||
startedEventId?: number;
|
||||
}
|
||||
|
||||
export interface ChildWorkflowExecutionTimedOutEventAttributes {
|
||||
workflowExecution?: WorkflowExecution;
|
||||
workflowType?: WorkflowType;
|
||||
timeoutType?: string;
|
||||
initiatedEventId?: number;
|
||||
startedEventId?: number;
|
||||
}
|
||||
|
||||
export interface ChildWorkflowExecutionCanceledEventAttributes {
|
||||
workflowExecution?: WorkflowExecution;
|
||||
workflowType?: WorkflowType;
|
||||
details?: string;
|
||||
initiatedEventId?: number;
|
||||
startedEventId?: number;
|
||||
}
|
||||
|
||||
export interface ChildWorkflowExecutionTerminatedEventAttributes {
|
||||
workflowExecution?: WorkflowExecution;
|
||||
workflowType?: WorkflowType;
|
||||
initiatedEventId?: number;
|
||||
startedEventId?: number;
|
||||
}
|
||||
|
||||
export interface SignalExternalWorkflowExecutionInitiatedEventAttributes {
|
||||
workflowId?: string;
|
||||
runId?: string;
|
||||
signalName?: string;
|
||||
input?: string;
|
||||
decisionTaskCompletedEventId?: number;
|
||||
control?: string;
|
||||
}
|
||||
|
||||
export interface ExternalWorkflowExecutionSignaledEventAttributes {
|
||||
workflowExecution?: WorkflowExecution;
|
||||
initiatedEventId?: number;
|
||||
}
|
||||
|
||||
export interface SignalExternalWorkflowExecutionFailedEventAttributes {
|
||||
workflowId?: string;
|
||||
runId?: string;
|
||||
cause?: string;
|
||||
initiatedEventId?: number;
|
||||
decisionTaskCompletedEventId?: number;
|
||||
control?: string;
|
||||
}
|
||||
|
||||
export interface ExternalWorkflowExecutionCancelRequestedEventAttributes {
|
||||
workflowExecution?: WorkflowExecution;
|
||||
initiatedEventId?: number;
|
||||
}
|
||||
|
||||
export interface RequestCancelExternalWorkflowExecutionInitiatedEventAttributes {
|
||||
workflowId?: string;
|
||||
runId?: string;
|
||||
decisionTaskCompletedEventId?: number;
|
||||
control?: string;
|
||||
}
|
||||
|
||||
export interface RequestCancelExternalWorkflowExecutionFailedEventAttributes {
|
||||
workflowId?: string;
|
||||
runId?: string;
|
||||
cause?: string;
|
||||
initiatedEventId?: number;
|
||||
decisionTaskCompletedEventId?: number;
|
||||
control?: string;
|
||||
}
|
||||
|
||||
export interface ScheduleActivityTaskFailedEventAttributes {
|
||||
activityType?: ActivityType;
|
||||
activityId?: string;
|
||||
cause?: string;
|
||||
decisionTaskCompletedEventId?: number;
|
||||
}
|
||||
|
||||
export interface RequestCancelActivityTaskFailedEventAttributes {
|
||||
activityId?: string;
|
||||
cause?: string;
|
||||
decisionTaskCompletedEventId?: number;
|
||||
}
|
||||
|
||||
export interface StartTimerFailedEventAttributes {
|
||||
timerId?: string;
|
||||
cause?: string;
|
||||
decisionTaskCompletedEventId?: number;
|
||||
}
|
||||
|
||||
export interface CancelTimerFailedEventAttributes {
|
||||
timerId?: string;
|
||||
cause?: string;
|
||||
decisionTaskCompletedEventId?: number;
|
||||
}
|
||||
|
||||
export interface StartChildWorkflowExecutionFailedEventAttributes {
|
||||
workflowType?: WorkflowType;
|
||||
cause?: string;
|
||||
workflowId?: string;
|
||||
initiatedEventId?: number;
|
||||
decisionTaskCompletedEventId?: number;
|
||||
control?: string;
|
||||
}
|
||||
|
||||
export interface ActivityTask {
|
||||
taskToken?: string;
|
||||
activityId?: string;
|
||||
startedEventId?: number;
|
||||
workflowExecution?: WorkflowExecution;
|
||||
activityType?: ActivityType;
|
||||
input?: string;
|
||||
}
|
||||
|
||||
export interface PollForActivityTaskResult {
|
||||
activityTask?: ActivityTask;
|
||||
}
|
||||
|
||||
export interface PollForDecisionTaskResult {
|
||||
decisionTask?: DecisionTask;
|
||||
}
|
||||
|
||||
export interface StartWorkflowExecutionResult {
|
||||
run?: Run;
|
||||
}
|
||||
|
||||
export interface Run {
|
||||
runId?: string;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
export module Sns {
|
||||
|
||||
export interface Client {
|
||||
config: ClientConfig;
|
||||
|
||||
publicTopic(params: PublishRequest, callback: (err: any, data: PublishResult) => void): void;
|
||||
createTopic(params: CreateTopicRequest, callback: (err: any, data: CreateTopicResult) => void): void;
|
||||
deleteTopic(params: DeleteTopicRequest, callback: (err: any, data: any) => void): void;
|
||||
}
|
||||
|
||||
export interface PublishRequest {
|
||||
TopicArn?: string;
|
||||
Message?: string;
|
||||
MessageStructure?: string;
|
||||
Subject?: string;
|
||||
}
|
||||
|
||||
export interface PublishResult {
|
||||
MessageId?: string;
|
||||
}
|
||||
|
||||
export interface CreateTopicRequest {
|
||||
Name?: string;
|
||||
}
|
||||
|
||||
export interface CreateTopicResult {
|
||||
TopicArn?: string;
|
||||
}
|
||||
|
||||
export interface DeleteTopicRequest {
|
||||
TopicArn?: string;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
export module s3 {
|
||||
|
||||
export interface Client {
|
||||
config: ClientConfig;
|
||||
|
||||
putObject(params: PutObjectRequest, callback: (err: any, data: any) => void): void;
|
||||
getObject(params: GetObjectRequest, callback: (err: any, data: any) => void): void;
|
||||
}
|
||||
|
||||
export interface PutObjectRequest {
|
||||
ACL?: string;
|
||||
Body?: any;
|
||||
Bucket: string;
|
||||
CacheControl?: string;
|
||||
ContentDisposition?: string;
|
||||
ContentEncoding?: string;
|
||||
ContentLanguage?: string;
|
||||
ContentLength?: string;
|
||||
ContentMD5?: string;
|
||||
ContentType?: string;
|
||||
Expires?: any;
|
||||
GrantFullControl?: string;
|
||||
GrantRead?: string;
|
||||
GrantReadACP?: string;
|
||||
GrantWriteACP?: string;
|
||||
Key: string;
|
||||
Metadata?: string[];
|
||||
ServerSideEncryption?: string;
|
||||
StorageClass?: string;
|
||||
WebsiteRedirectLocation?: string;
|
||||
}
|
||||
|
||||
export interface GetObjectRequest {
|
||||
Bucket: string;
|
||||
IfMatch?: string;
|
||||
IfModifiedSince?: any;
|
||||
IfNoneMatch?: string;
|
||||
IfUnmodifiedSince?: any;
|
||||
Key: string;
|
||||
Range?: string;
|
||||
ResponseCacheControl?: string;
|
||||
ResponseContentDisposition?: string;
|
||||
ResponseContentEncoding?: string;
|
||||
ResponseContentLanguage?: string;
|
||||
ResponseContentType?: string;
|
||||
ResponseExpires?: any;
|
||||
VersionId?: string;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
27
consolidate/consolidate-tests.ts
Normal file
27
consolidate/consolidate-tests.ts
Normal file
@@ -0,0 +1,27 @@
|
||||
/// <reference path="consolidate.d.ts" />
|
||||
|
||||
import consolidate = require('consolidate');
|
||||
|
||||
var path: string = null;
|
||||
var options: any = null;
|
||||
var fn: any = null;
|
||||
|
||||
consolidate.clearCache();
|
||||
consolidate.jade(path, options, fn);
|
||||
consolidate.dust(path, options, fn);
|
||||
consolidate.swig(path, options, fn);
|
||||
consolidate.liquor(path, options, fn);
|
||||
consolidate.ejs(path, options, fn);
|
||||
consolidate.eco(path, options, fn);
|
||||
consolidate.jazz(path, options, fn);
|
||||
consolidate.jqtpl(path, options, fn);
|
||||
consolidate.haml(path, options, fn);
|
||||
consolidate.whiskers(path, options, fn);
|
||||
//consolidate.'haml-coffee':Function;
|
||||
consolidate.hogan(path, options, fn);
|
||||
consolidate.handlebars(path, options, fn);
|
||||
consolidate.underscore(path, options, fn);
|
||||
consolidate.qejs(path, options, fn);
|
||||
consolidate.walrus(path, options, fn);
|
||||
consolidate.mustache(path, options, fn);
|
||||
consolidate.dot(path, options, fn);
|
||||
30
consolidate/consolidate.d.ts
vendored
Normal file
30
consolidate/consolidate.d.ts
vendored
Normal file
@@ -0,0 +1,30 @@
|
||||
// Type definitions for consolidate
|
||||
// Project: https://github.com/visionmedia/consolidate.js
|
||||
// Definitions by: Carlos Ballesteros Velasco <https://github.com/soywiz>
|
||||
// Definitions: https://github.com/borisyankov/DefinitelyTyped
|
||||
|
||||
// Imported from: https://github.com/soywiz/typescript-node-definitions/consolidate.d.ts
|
||||
|
||||
/// <reference path="../node/node.d.ts" />
|
||||
|
||||
declare module "consolidate" {
|
||||
export function clearCache(): void;
|
||||
export var jade: (path: String, options: any, fn: any) => void;
|
||||
export var dust: (path: String, options: any, fn: any) => void;
|
||||
export var swig: (path: String, options: any, fn: any) => void;
|
||||
export var liquor: (path: String, options: any, fn: any) => void;
|
||||
export var ejs: (path: String, options: any, fn: any) => void;
|
||||
export var eco: (path: String, options: any, fn: any) => void;
|
||||
export var jazz: (path: String, options: any, fn: any) => void;
|
||||
export var jqtpl: (path: String, options: any, fn: any) => void;
|
||||
export var haml: (path: String, options: any, fn: any) => void;
|
||||
export var whiskers: (path: String, options: any, fn: any) => void;
|
||||
//export var 'haml-coffee':Function;
|
||||
export var hogan: (path: String, options: any, fn: any) => void;
|
||||
export var handlebars: (path: String, options: any, fn: any) => void;
|
||||
export var underscore: (path: String, options: any, fn: any) => void;
|
||||
export var qejs: (path: String, options: any, fn: any) => void;
|
||||
export var walrus: (path: String, options: any, fn: any) => void;
|
||||
export var mustache: (path: String, options: any, fn: any) => void;
|
||||
export var dot: (path: String, options: any, fn: any) => void;
|
||||
}
|
||||
16
cordova/plugins/Contacts.d.ts
vendored
16
cordova/plugins/Contacts.d.ts
vendored
@@ -143,9 +143,9 @@ interface ContactName {
|
||||
/** The contact's middle name. */
|
||||
middleName?: string;
|
||||
/** The contact's prefix (example Mr. or Dr.) */
|
||||
honorifixPrefix?: string;
|
||||
honorificPrefix?: string;
|
||||
/** The contact's suffix (example Esq.). */
|
||||
honorifixSuffix?: string;
|
||||
honorificSuffix?: string;
|
||||
}
|
||||
|
||||
declare var ContactName: {
|
||||
@@ -154,8 +154,8 @@ declare var ContactName: {
|
||||
familyName?: string,
|
||||
givenName?: string,
|
||||
middleName?: string,
|
||||
honorifixPrefix?: string,
|
||||
honorifixSuffix?: string): ContactName
|
||||
honorificPrefix?: string,
|
||||
honorificSuffix?: string): ContactName
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -171,19 +171,19 @@ declare var ContactName: {
|
||||
* contains a base64-encoded image string.
|
||||
*/
|
||||
interface ContactField {
|
||||
/** Set to true if this ContactField contains the user's preferred value. */
|
||||
pref: boolean;
|
||||
/** A string that indicates what type of field this is, home for example. */
|
||||
type: string;
|
||||
/** The value of the field, such as a phone number or email address. */
|
||||
value: string;
|
||||
/** Set to true if this ContactField contains the user's preferred value. */
|
||||
pref: boolean;
|
||||
}
|
||||
|
||||
declare var ContactField: {
|
||||
/** Constructor for ContactField object */
|
||||
new(type?: string,
|
||||
pref?: boolean,
|
||||
value?: string): ContactField
|
||||
value?: string,
|
||||
pref?: boolean): ContactField
|
||||
};
|
||||
|
||||
/**
|
||||
|
||||
22
cordova/plugins/FileSystem.d.ts
vendored
22
cordova/plugins/FileSystem.d.ts
vendored
@@ -25,17 +25,7 @@ interface Window {
|
||||
|
||||
/** This interface represents a file system. */
|
||||
interface FileSystem {
|
||||
/**
|
||||
* Constructor for FileSystem object
|
||||
* @param name This is the name of the file system. The specifics of naming filesystems
|
||||
* is unspecified, but a name must be unique across the list of exposed file systems.
|
||||
* @param root The root directory of the file system.
|
||||
*/
|
||||
new (name: string, root: DirectoryEntry)
|
||||
/**
|
||||
* This is the name of the file system. The specifics of naming filesystems
|
||||
* is unspecified, but a name must be unique across the list of exposed file systems.
|
||||
*/
|
||||
/* The name of the file system, unique across the list of exposed file systems. */
|
||||
name: string;
|
||||
/** The root directory of the file system. */
|
||||
root: DirectoryEntry;
|
||||
@@ -46,8 +36,6 @@ interface FileSystem {
|
||||
* each of which may be a File or DirectoryEntry.
|
||||
*/
|
||||
interface Entry {
|
||||
/** Constructor for Entry object */
|
||||
new ( isFile: boolean, isDirectory: boolean, name: string, fullPath: string, fileSystem: FileSystem, nativeURL: string) ;
|
||||
/** Entry is a file. */
|
||||
isFile: boolean;
|
||||
/** Entry is a directory. */
|
||||
@@ -265,13 +253,13 @@ interface FileSaver extends EventTarget {
|
||||
*/
|
||||
interface FileWriter extends FileSaver {
|
||||
/**
|
||||
* The byte offset at which the next write to the file will occur. This must be no greater than length.
|
||||
* A newly-created FileWriter must have position set to 0.
|
||||
* The byte offset at which the next write to the file will occur. This always less or equal than length.
|
||||
* A newly-created FileWriter will have position set to 0.
|
||||
*/
|
||||
position: number;
|
||||
/**
|
||||
* The length of the file. If the user does not have read access to the file,
|
||||
* this must be the highest byte offset at which the user has written.
|
||||
* this will be the highest byte offset at which the user has written.
|
||||
*/
|
||||
length: number;
|
||||
/**
|
||||
@@ -287,7 +275,7 @@ interface FileWriter extends FileSaver {
|
||||
seek(offset: number): void;
|
||||
/**
|
||||
* Changes the length of the file to that specified. If shortening the file, data beyond the new length
|
||||
* must be discarded. If extending the file, the existing data must be zero-padded up to the new length.
|
||||
* will be discarded. If extending the file, the existing data will be zero-padded up to the new length.
|
||||
* @param size The size to which the length of the file is to be adjusted, measured in bytes.
|
||||
*/
|
||||
truncate(size: number): void;
|
||||
|
||||
13
cordova/plugins/Media.d.ts
vendored
13
cordova/plugins/Media.d.ts
vendored
@@ -27,19 +27,6 @@ declare var Media: {
|
||||
* W3C specification and may deprecate the current APIs.
|
||||
*/
|
||||
interface Media {
|
||||
/**
|
||||
* Constructor for Media object.
|
||||
* @param src A URI containing the audio content.
|
||||
* @param mediaSuccess The callback that executes after a Media object has completed
|
||||
* the current play, record, or stop action.
|
||||
* @param mediaError The callback that executes if an error occurs.
|
||||
* @param mediaStatus The callback that executes to indicate status changes.
|
||||
*/
|
||||
new (
|
||||
src: string,
|
||||
mediaSuccess: () => void,
|
||||
mediaError?: (error: MediaError) => any,
|
||||
mediaStatus?: (status: number) => void): Media;
|
||||
/**
|
||||
* Returns the current position within an audio file. Also updates the Media object's position parameter.
|
||||
* @param mediaSuccess The callback that is passed the current position in seconds.
|
||||
|
||||
4
cordova/plugins/WebSQL.d.ts
vendored
4
cordova/plugins/WebSQL.d.ts
vendored
@@ -1,5 +1,5 @@
|
||||
// Type definitions for Apache Cordova WebSQL plugin.
|
||||
// Project: https://github.com/sgrebnov/cordova-plugin-websql
|
||||
// Project: https://github.com/MSOpenTech/cordova-plugin-websql
|
||||
// Definitions by: Microsoft Open Technologies, Inc. <http://msopentech.com>
|
||||
// Definitions: https://github.com/borisyankov/DefinitelyTyped
|
||||
//
|
||||
@@ -43,7 +43,7 @@ interface Database {
|
||||
successCallback?: () => void): void;
|
||||
name: string;
|
||||
version: string;
|
||||
displayname: string;
|
||||
displayName: string;
|
||||
size: number;
|
||||
}
|
||||
|
||||
|
||||
13
fibers/fibers-tests.ts
Normal file
13
fibers/fibers-tests.ts
Normal file
@@ -0,0 +1,13 @@
|
||||
/// <reference path="fibers.d.ts" />
|
||||
|
||||
import fibers = require('fibers');
|
||||
|
||||
var fib: fibers.Fiber;
|
||||
var x:any = null;
|
||||
var func: () => void = null;
|
||||
|
||||
fib = fibers(func);
|
||||
fib = fibers.current;
|
||||
x = fibers.yield(x);
|
||||
x = fib.run();
|
||||
x = fib.run(x);
|
||||
24
fibers/fibers.d.ts
vendored
Normal file
24
fibers/fibers.d.ts
vendored
Normal file
@@ -0,0 +1,24 @@
|
||||
// Type definitions for fibers
|
||||
// Project: https://github.com/laverdet/node-fibers
|
||||
// Definitions by: Carlos Ballesteros Velasco <https://github.com/soywiz>
|
||||
// Definitions: https://github.com/borisyankov/DefinitelyTyped
|
||||
|
||||
// Imported from: https://github.com/soywiz/typescript-node-definitions/fibers.d.ts
|
||||
|
||||
declare module "fibers" {
|
||||
|
||||
function fibers(callback: () => void): fibers.Fiber;
|
||||
|
||||
module fibers {
|
||||
export var poolSize: number;
|
||||
export var fibersCreated: number;
|
||||
export var current: fibers.Fiber;
|
||||
export function yield(value: any): any;
|
||||
|
||||
export interface Fiber {
|
||||
run(step?: number): any;
|
||||
}
|
||||
}
|
||||
|
||||
export = fibers;
|
||||
}
|
||||
8
form-data/form-data-tests.ts
Normal file
8
form-data/form-data-tests.ts
Normal file
@@ -0,0 +1,8 @@
|
||||
/// <reference path="form-data.d.ts" />
|
||||
|
||||
import formData = require('form-data');
|
||||
|
||||
var value: any;
|
||||
var fd = new formData.FormData();
|
||||
var obj: Object = fd.getHeaders();
|
||||
value = fd.pipe(value);
|
||||
15
form-data/form-data.d.ts
vendored
Normal file
15
form-data/form-data.d.ts
vendored
Normal file
@@ -0,0 +1,15 @@
|
||||
// Type definitions for fibers
|
||||
// Project: https://github.com/felixge/node-form-data
|
||||
// Definitions by: Carlos Ballesteros Velasco <https://github.com/soywiz>
|
||||
// Definitions: https://github.com/borisyankov/DefinitelyTyped
|
||||
|
||||
// Imported from: https://github.com/soywiz/typescript-node-definitions/form-data.d.ts
|
||||
|
||||
declare module "form-data" {
|
||||
export class FormData {
|
||||
append(key: string, value: any): FormData;
|
||||
getHeaders(): Object;
|
||||
// TODO expand pipe
|
||||
pipe(to: any): any;
|
||||
}
|
||||
}
|
||||
229
fs-extra/fs-extra-tests.ts
Normal file
229
fs-extra/fs-extra-tests.ts
Normal file
@@ -0,0 +1,229 @@
|
||||
/// <reference path="fs-extra.d.ts" />
|
||||
/// <reference path="../node/node.d.ts" />
|
||||
|
||||
import fs = require('fs-extra');
|
||||
import stream = require('stream');
|
||||
|
||||
var stats: fs.Stats;
|
||||
var str: string;
|
||||
var strArr: string[];
|
||||
var bool: boolean;
|
||||
var num: number;
|
||||
var src: string;
|
||||
var dest: string;
|
||||
var file: string;
|
||||
var filename: string;
|
||||
var dir: string;
|
||||
var path: string;
|
||||
var data: any;
|
||||
var object: Object;
|
||||
var buffer: NodeBuffer;
|
||||
var modeNum: number;
|
||||
var modeStr: string;
|
||||
var encoding: string;
|
||||
var type: string;
|
||||
var flags: string;
|
||||
var srcpath: string;
|
||||
var dstpath: string;
|
||||
var oldPath: string;
|
||||
var newPath: string;
|
||||
var cache: string;
|
||||
var offset: number;
|
||||
var length: number;
|
||||
var position: number;
|
||||
var cacheBool: boolean;
|
||||
var cacheStr: string;
|
||||
var fd: number;
|
||||
var len: number;
|
||||
var uid: number;
|
||||
var gid: number;
|
||||
var atime: number;
|
||||
var mtime: number;
|
||||
var statsCallback: (err: Error, stats: fs.Stats) => void;
|
||||
var errorCallback: (err: Error) => void;
|
||||
var openOpts: fs.OpenOptions;
|
||||
var watcher: fs.FSWatcher;
|
||||
var readStreeam: stream.Readable;
|
||||
var writeStream: stream.Writable;
|
||||
|
||||
fs.copy(src, dest, errorCallback);
|
||||
fs.copy(src, dest, (src: string) => {
|
||||
return false;
|
||||
}, errorCallback);
|
||||
fs.copySync(src, dest);
|
||||
fs.copySync(src, dest, (src: string) => {
|
||||
return false;
|
||||
});
|
||||
fs.createFile(file, errorCallback);
|
||||
fs.createFileSync(file);
|
||||
|
||||
fs.mkdirs(dir, errorCallback);
|
||||
fs.mkdirsSync(dir);
|
||||
fs.mkdirp(dir, errorCallback);
|
||||
fs.mkdirpSync(dir);
|
||||
|
||||
fs.outputFile(file, data, errorCallback);
|
||||
fs.outputFileSync(file, data);
|
||||
fs.outputJson(file, data, errorCallback);
|
||||
fs.outputJSON(file, data, errorCallback);
|
||||
|
||||
fs.outputJsonSync(file, data);
|
||||
fs.outputJSONSync(file, data);
|
||||
|
||||
fs.readJson(file, errorCallback);
|
||||
fs.readJson(file, openOpts, errorCallback);
|
||||
fs.readJSON(file, errorCallback);
|
||||
fs.readJSON(file, openOpts, errorCallback);
|
||||
|
||||
fs.readJsonSync(file, openOpts);
|
||||
fs.readJSONSync(file, openOpts);
|
||||
|
||||
fs.remove(dir, errorCallback);
|
||||
fs.removeSync(dir);
|
||||
|
||||
fs.writeJson(file, object, errorCallback);
|
||||
fs.writeJson(file, object, openOpts, errorCallback);
|
||||
fs.writeJSON(file, object, errorCallback);
|
||||
fs.writeJSON(file, object, openOpts, errorCallback);
|
||||
|
||||
fs.writeJsonSync(file, object, openOpts);
|
||||
fs.writeJSONSync(file, object, openOpts);
|
||||
|
||||
fs.rename(oldPath, newPath, errorCallback);
|
||||
fs.renameSync(oldPath, newPath);
|
||||
fs.truncate(fd, len, errorCallback);
|
||||
fs.truncateSync(fd, len);
|
||||
fs.chown(path, uid, gid, errorCallback);
|
||||
fs.chownSync(path, uid, gid);
|
||||
fs.fchown(fd, uid, gid, errorCallback);
|
||||
fs.fchownSync(fd, uid, gid);
|
||||
fs.lchown(path, uid, gid, errorCallback);
|
||||
fs.lchownSync(path, uid, gid);
|
||||
fs.chmod(path, modeNum, errorCallback);
|
||||
fs.chmod(path, modeStr, errorCallback);
|
||||
fs.chmodSync(path, modeNum);
|
||||
fs.chmodSync(path, modeStr);
|
||||
fs.fchmod(fd, modeNum, errorCallback);
|
||||
fs.fchmod(fd, modeStr, errorCallback);
|
||||
fs.fchmodSync(fd, modeNum);
|
||||
fs.fchmodSync(fd, modeStr);
|
||||
fs.lchmod(path, modeStr, errorCallback);
|
||||
fs.lchmod(path, modeNum, errorCallback);
|
||||
fs.lchmodSync(path, modeNum);
|
||||
fs.lchmodSync(path, modeStr);
|
||||
fs.stat(path, statsCallback);
|
||||
fs.lstat(path, statsCallback);
|
||||
fs.fstat(fd, statsCallback);
|
||||
stats = fs.statSync(path);
|
||||
stats = fs.lstatSync(path);
|
||||
stats = fs.fstatSync(fd);
|
||||
fs.link(srcpath, dstpath, errorCallback);
|
||||
fs.linkSync(srcpath, dstpath);
|
||||
fs.symlink(srcpath, dstpath, type, errorCallback);
|
||||
fs.symlinkSync(srcpath, dstpath, type);
|
||||
fs.readlink(path, (err: Error, linkString: string) => {
|
||||
|
||||
});
|
||||
fs.realpath(path, (err: Error, resolvedPath: string) => {
|
||||
|
||||
});
|
||||
fs.realpath(path, cache, (err: Error, resolvedPath: string) => {
|
||||
|
||||
});
|
||||
str = fs.realpathSync(path, cacheBool);
|
||||
fs.unlink(path, errorCallback);
|
||||
fs.unlinkSync(path);
|
||||
fs.rmdir(path, errorCallback);
|
||||
fs.rmdirSync(path);
|
||||
fs.mkdir(path, modeNum, errorCallback);
|
||||
fs.mkdir(path, modeStr, errorCallback);
|
||||
fs.mkdirSync(path, modeNum);
|
||||
fs.mkdirSync(path, modeStr);
|
||||
fs.readdir(path, (err: Error, files: string[]) => {
|
||||
|
||||
});
|
||||
strArr = fs.readdirSync(path);
|
||||
fs.close(fd, errorCallback);
|
||||
fs.closeSync(fd);
|
||||
fs.open(path, flags, modeStr, (err: Error, fd: number) => [
|
||||
|
||||
]);
|
||||
num = fs.openSync(path, flags, modeStr);
|
||||
fs.utimes(path, atime, mtime, errorCallback);
|
||||
fs.utimesSync(path, atime, mtime);
|
||||
fs.futimes(fd, atime, mtime, errorCallback);
|
||||
fs.futimesSync(fd, atime, mtime);
|
||||
fs.fsync(fd, errorCallback);
|
||||
fs.fsyncSync(fd);
|
||||
fs.write(fd, buffer, offset, length, position, (err: Error, written: number, buffer: NodeBuffer) => {
|
||||
|
||||
});
|
||||
num = fs.writeSync(fd, buffer, offset, length, position);
|
||||
fs.read(fd, buffer, offset, length, position, (err: Error, bytesRead: number, buffer: NodeBuffer) => {
|
||||
|
||||
});
|
||||
num = fs.readSync(fd, buffer, offset, length, position);
|
||||
fs.readFile(filename, (err: Error, data: NodeBuffer) => {
|
||||
|
||||
});
|
||||
fs.readFile(filename, encoding, (err: Error, data: string) => {
|
||||
|
||||
});
|
||||
fs.readFile(filename, openOpts, (err: Error, data: string) => {
|
||||
|
||||
});
|
||||
fs.readFile(filename, (err: Error, data: NodeBuffer) => {
|
||||
|
||||
});
|
||||
buffer = fs.readFileSync(filename);
|
||||
str = fs.readFileSync(filename, encoding);
|
||||
str = fs.readFileSync(filename, openOpts);
|
||||
|
||||
fs.writeFile(filename, data, errorCallback);
|
||||
fs.writeFile(filename, data, encoding, errorCallback);
|
||||
fs.writeFile(filename, data, openOpts, errorCallback);
|
||||
fs.writeFileSync(filename, data);
|
||||
fs.writeFileSync(filename, data, encoding);
|
||||
fs.writeFileSync(filename, data, openOpts);
|
||||
|
||||
fs.appendFile(filename, data, errorCallback);
|
||||
fs.appendFile(filename, data, encoding, errorCallback);
|
||||
fs.appendFile(filename, data, openOpts, errorCallback);
|
||||
fs.appendFileSync(filename, data);
|
||||
fs.appendFileSync(filename, data, encoding);
|
||||
fs.appendFileSync(filename, data, openOpts);
|
||||
|
||||
fs.watchFile(filename, {
|
||||
curr: stats,
|
||||
prev: stats
|
||||
});
|
||||
fs.watchFile(filename, {
|
||||
persistent: bool,
|
||||
interval: num
|
||||
}, {
|
||||
curr: stats,
|
||||
prev: stats
|
||||
});
|
||||
fs.unwatchFile(filename);
|
||||
watcher = fs.watch(filename, { persistent: bool }, (event: string, filename: string) => {
|
||||
|
||||
});
|
||||
fs.exists(path, (exists: boolean) => {
|
||||
|
||||
});
|
||||
bool = fs.existsSync(path);
|
||||
|
||||
readStreeam = fs.createReadStream(path);
|
||||
readStreeam = fs.createReadStream(path, {
|
||||
flags: str,
|
||||
encoding: str,
|
||||
fd: num,
|
||||
mode: num,
|
||||
bufferSize: num
|
||||
});
|
||||
writeStream = fs.createWriteStream(path);
|
||||
writeStream = fs.createWriteStream(path, {
|
||||
flags: str,
|
||||
encoding: str,
|
||||
string: str
|
||||
});
|
||||
187
fs-extra/fs-extra.d.ts
vendored
Normal file
187
fs-extra/fs-extra.d.ts
vendored
Normal file
@@ -0,0 +1,187 @@
|
||||
// Type definitions for aws-sdk
|
||||
// Project: https://github.com/jprichardson/node-fs-extra
|
||||
// Definitions by: midknight41 <https://github.com/midknight41>
|
||||
// Definitions: https://github.com/borisyankov/DefinitelyTyped
|
||||
|
||||
// Imported from: https://github.com/soywiz/typescript-node-definitions/fs-extra.d.ts
|
||||
|
||||
///<reference path="../node/node.d.ts"/>
|
||||
|
||||
declare module "fs-extra" {
|
||||
import stream = require("stream");
|
||||
|
||||
export interface Stats {
|
||||
isFile(): boolean;
|
||||
isDirectory(): boolean;
|
||||
isBlockDevice(): boolean;
|
||||
isCharacterDevice(): boolean;
|
||||
isSymbolicLink(): boolean;
|
||||
isFIFO(): boolean;
|
||||
isSocket(): boolean;
|
||||
dev: number;
|
||||
ino: number;
|
||||
mode: number;
|
||||
nlink: number;
|
||||
uid: number;
|
||||
gid: number;
|
||||
rdev: number;
|
||||
size: number;
|
||||
blksize: number;
|
||||
blocks: number;
|
||||
atime: Date;
|
||||
mtime: Date;
|
||||
ctime: Date;
|
||||
}
|
||||
|
||||
export interface FSWatcher {
|
||||
close(): void;
|
||||
}
|
||||
|
||||
export class ReadStream extends stream.Readable { }
|
||||
export class WriteStream extends stream.Writable { }
|
||||
|
||||
//extended methods
|
||||
export function copy(src: string, dest: string, callback?: (err: Error) => void): void;
|
||||
export function copy(src: string, dest: string, filter: (src: string) => boolean, callback?: (err: Error) => void): void;
|
||||
|
||||
export function copySync(src: string, dest: string): void;
|
||||
export function copySync(src: string, dest: string, filter: (src: string) => boolean): void;
|
||||
|
||||
export function createFile(file: string, callback?: (err: Error) => void): void;
|
||||
export function createFileSync(file: string): void;
|
||||
|
||||
export function mkdirs(dir: string, callback?: (err: Error) => void): void;
|
||||
export function mkdirp(dir: string, callback?: (err: Error) => void): void;
|
||||
export function mkdirsSync(dir: string): void;
|
||||
export function mkdirpSync(dir: string): void;
|
||||
|
||||
export function outputFile(file: string, data: any, callback?: (err: Error) => void): void;
|
||||
export function outputFileSync(file: string, data: any): void;
|
||||
|
||||
export function outputJson(file: string, data: any, callback?: (err: Error) => void): void;
|
||||
export function outputJSON(file: string, data: any, callback?: (err: Error) => void): void;
|
||||
export function outputJsonSync(file: string, data: any): void;
|
||||
export function outputJSONSync(file: string, data: any): void;
|
||||
|
||||
export function readJson(file: string, callback?: (err: Error) => void): void;
|
||||
export function readJson(file: string, options?: OpenOptions, callback?: (err: Error) => void): void;
|
||||
export function readJSON(file: string, callback?: (err: Error) => void): void;
|
||||
export function readJSON(file: string, options?: OpenOptions, callback?: (err: Error) => void): void;
|
||||
|
||||
export function readJsonSync(file: string, options?: OpenOptions): void;
|
||||
export function readJSONSync(file: string, options?: OpenOptions): void;
|
||||
|
||||
export function remove(dir: string, callback?: (err: Error) => void): void;
|
||||
export function removeSync(dir: string): void;
|
||||
// export function delete(dir: string, callback?: (err: Error) => void): void;
|
||||
// export function deleteSync(dir: string): void;
|
||||
|
||||
export function writeJson(file: string, object: any, callback?: (err: Error) => void): void;
|
||||
export function writeJson(file: string, object: any, options?: OpenOptions, callback?: (err: Error) => void): void;
|
||||
export function writeJSON(file: string, object: any, callback?: (err: Error) => void): void;
|
||||
export function writeJSON(file: string, object: any, options?: OpenOptions, callback?: (err: Error) => void): void;
|
||||
|
||||
export function writeJsonSync(file: string, object: any, options?: OpenOptions): void;
|
||||
export function writeJSONSync(file: string, object: any, options?: OpenOptions): void;
|
||||
|
||||
export function rename(oldPath: string, newPath: string, callback?: (err: Error) => void): void;
|
||||
export function renameSync(oldPath: string, newPath: string): void;
|
||||
export function truncate(fd: number, len: number, callback?: (err: Error) => void): void;
|
||||
export function truncateSync(fd: number, len: number): void;
|
||||
export function chown(path: string, uid: number, gid: number, callback?: (err: Error) => void): void;
|
||||
export function chownSync(path: string, uid: number, gid: number): void;
|
||||
export function fchown(fd: number, uid: number, gid: number, callback?: (err: Error) => void): void;
|
||||
export function fchownSync(fd: number, uid: number, gid: number): void;
|
||||
export function lchown(path: string, uid: number, gid: number, callback?: (err: Error) => void): void;
|
||||
export function lchownSync(path: string, uid: number, gid: number): void;
|
||||
export function chmod(path: string, mode: number, callback?: (err: Error) => void): void;
|
||||
export function chmod(path: string, mode: string, callback?: (err: Error) => void): void;
|
||||
export function chmodSync(path: string, mode: number): void;
|
||||
export function chmodSync(path: string, mode: string): void;
|
||||
export function fchmod(fd: number, mode: number, callback?: (err: Error) => void): void;
|
||||
export function fchmod(fd: number, mode: string, callback?: (err: Error) => void): void;
|
||||
export function fchmodSync(fd: number, mode: number): void;
|
||||
export function fchmodSync(fd: number, mode: string): void;
|
||||
export function lchmod(path: string, mode: string, callback?: (err: Error) => void): void;
|
||||
export function lchmod(path: string, mode: number, callback?: (err: Error) => void): void;
|
||||
export function lchmodSync(path: string, mode: number): void;
|
||||
export function lchmodSync(path: string, mode: string): void;
|
||||
export function stat(path: string, callback?: (err: Error, stats: Stats) => void): void;
|
||||
export function lstat(path: string, callback?: (err: Error, stats: Stats) => void): void;
|
||||
export function fstat(fd: number, callback?: (err: Error, stats: Stats) => void): void;
|
||||
export function statSync(path: string): Stats;
|
||||
export function lstatSync(path: string): Stats;
|
||||
export function fstatSync(fd: number): Stats;
|
||||
export function link(srcpath: string, dstpath: string, callback?: (err: Error) => void): void;
|
||||
export function linkSync(srcpath: string, dstpath: string): void;
|
||||
export function symlink(srcpath: string, dstpath: string, type?: string, callback?: (err: Error) => void): void;
|
||||
export function symlinkSync(srcpath: string, dstpath: string, type?: string): void;
|
||||
export function readlink(path: string, callback?: (err: Error, linkString: string) => void): void;
|
||||
export function realpath(path: string, callback?: (err: Error, resolvedPath: string) => void): void;
|
||||
export function realpath(path: string, cache: string, callback: (err: Error, resolvedPath: string) => void): void;
|
||||
export function realpathSync(path: string, cache?: boolean): string;
|
||||
export function unlink(path: string, callback?: (err: Error) => void): void;
|
||||
export function unlinkSync(path: string): void;
|
||||
export function rmdir(path: string, callback?: (err: Error) => void): void;
|
||||
export function rmdirSync(path: string): void;
|
||||
export function mkdir(path: string, mode?: number, callback?: (err: Error) => void): void;
|
||||
export function mkdir(path: string, mode?: string, callback?: (err: Error) => void): void;
|
||||
export function mkdirSync(path: string, mode?: number): void;
|
||||
export function mkdirSync(path: string, mode?: string): void;
|
||||
export function readdir(path: string, callback?: (err: Error, files: string[]) => void ): void;
|
||||
export function readdirSync(path: string): string[];
|
||||
export function close(fd: number, callback?: (err: Error) => void): void;
|
||||
export function closeSync(fd: number): void;
|
||||
export function open(path: string, flags: string, mode?: string, callback?: (err: Error, fs: number) => void): void;
|
||||
export function openSync(path: string, flags: string, mode?: string): number;
|
||||
export function utimes(path: string, atime: number, mtime: number, callback?: (err: Error) => void): void;
|
||||
export function utimesSync(path: string, atime: number, mtime: number): void;
|
||||
export function futimes(fd: number, atime: number, mtime: number, callback?: (err: Error) => void): void;
|
||||
export function futimesSync(fd: number, atime: number, mtime: number): void;
|
||||
export function fsync(fd: number, callback?: (err: Error) => void): void;
|
||||
export function fsyncSync(fd: number): void;
|
||||
export function write(fd: number, buffer: NodeBuffer, offset: number, length: number, position: number, callback?: (err: Error, written: number, buffer: NodeBuffer) => void): void;
|
||||
export function writeSync(fd: number, buffer: NodeBuffer, offset: number, length: number, position: number): number;
|
||||
export function read(fd: number, buffer: NodeBuffer, offset: number, length: number, position: number, callback?: (err: Error, bytesRead: number, buffer: NodeBuffer) => void ): void;
|
||||
export function readSync(fd: number, buffer: NodeBuffer, offset: number, length: number, position: number): number;
|
||||
export function readFile(filename: string, encoding: string, callback: (err: Error, data: string) => void ): void;
|
||||
export function readFile(filename: string, options: OpenOptions, callback: (err: Error, data: string) => void ): void;
|
||||
export function readFile(filename: string, callback: (err: Error, data: NodeBuffer) => void ): void;
|
||||
export function readFileSync(filename: string): NodeBuffer;
|
||||
export function readFileSync(filename: string, encoding: string): string;
|
||||
export function readFileSync(filename: string, options: OpenOptions): string;
|
||||
export function writeFile(filename: string, data: any, encoding?: string, callback?: (err: Error) => void): void;
|
||||
export function writeFile(filename: string, data: any, options?: OpenOptions, callback?: (err: Error) => void): void;
|
||||
export function writeFileSync(filename: string, data: any, encoding?: string): void;
|
||||
export function writeFileSync(filename: string, data: any, option?: OpenOptions): void;
|
||||
export function appendFile(filename: string, data: any, encoding?: string, callback?: (err: Error) => void): void;
|
||||
export function appendFile(filename: string, data: any,option?: OpenOptions, callback?: (err: Error) => void): void;
|
||||
export function appendFileSync(filename: string, data: any, encoding?: string): void;
|
||||
export function appendFileSync(filename: string, data: any, option?: OpenOptions): void;
|
||||
export function watchFile(filename: string, listener: { curr: Stats; prev: Stats; }): void;
|
||||
export function watchFile(filename: string, options: { persistent?: boolean; interval?: number; }, listener: { curr: Stats; prev: Stats; }): void;
|
||||
export function unwatchFile(filename: string, listener?: Stats): void;
|
||||
export function watch(filename: string, options?: { persistent?: boolean; }, listener?: (event: string, filename: string) => any): FSWatcher;
|
||||
export function exists(path: string, callback?: (exists: boolean) => void ): void;
|
||||
export function existsSync(path: string): boolean;
|
||||
|
||||
export interface OpenOptions {
|
||||
encoding?: string;
|
||||
flag?: string;
|
||||
}
|
||||
|
||||
export interface ReadStreamOptions {
|
||||
flags?: string;
|
||||
encoding?: string;
|
||||
fd?: number;
|
||||
mode?: number;
|
||||
bufferSize?: number;
|
||||
}
|
||||
export interface WriteStreamOptions {
|
||||
flags?: string;
|
||||
encoding?: string;
|
||||
string?: string;
|
||||
}
|
||||
export function createReadStream(path: string, options?: ReadStreamOptions): ReadStream;
|
||||
export function createWriteStream(path: string, options?: WriteStreamOptions): WriteStream;
|
||||
}
|
||||
14
gently/gently-tests.ts
Normal file
14
gently/gently-tests.ts
Normal file
@@ -0,0 +1,14 @@
|
||||
/// <reference path="gently.d.ts" />
|
||||
|
||||
import Gently = require('gently');
|
||||
|
||||
var g = new Gently();
|
||||
|
||||
g.expect(null, '', () => {
|
||||
// ..
|
||||
})();
|
||||
g.expect(null, '', 0, () => {
|
||||
// ..
|
||||
})();
|
||||
|
||||
g.restore(null, '');
|
||||
26
gently/gently.d.ts
vendored
Normal file
26
gently/gently.d.ts
vendored
Normal file
@@ -0,0 +1,26 @@
|
||||
// Type definitions for gently
|
||||
// Project: https://www.npmjs.org/package/gently
|
||||
// Definitions by: bonnici <https://github.com/bonnici>
|
||||
// Definitions: https://github.com/borisyankov/DefinitelyTyped
|
||||
|
||||
// Imported from: https://github.com/soywiz/typescript-node-definitions/gently.d.ts
|
||||
|
||||
declare module "gently" {
|
||||
export = Gently;
|
||||
|
||||
class Gently {
|
||||
constructor();
|
||||
hijacked: any[];
|
||||
|
||||
expect(obj: any, method: string, stubFn?: (...args: any[]) => any): (...args: any[]) => any;
|
||||
expect(obj: any, method: string, count: number, stubFn: (...args: any[]) => any): (...args: any[]) => any;
|
||||
|
||||
restore(obj: any, method: string): void;
|
||||
|
||||
hijack(realRequire: (id: string) => any): (id: string) => any;
|
||||
|
||||
stub(location: string, exportsName?: string): any;
|
||||
|
||||
verify(msg?: string): void;
|
||||
}
|
||||
}
|
||||
27
imagemagick/imagemagick-tests.ts
Normal file
27
imagemagick/imagemagick-tests.ts
Normal file
@@ -0,0 +1,27 @@
|
||||
/// <reference path="imagemagick.d.ts" />
|
||||
/// <reference path="../node/node.d.ts" />
|
||||
|
||||
import imagemagick = require('imagemagick');
|
||||
import child_process = require('child_process');
|
||||
|
||||
var str: string = null;
|
||||
var num: number = 0;
|
||||
var cp: child_process.ChildProcess;
|
||||
|
||||
cp = imagemagick.identify(str, (err: Error, res: imagemagick.Features) => {
|
||||
str = res.format;
|
||||
num = res.width;
|
||||
num = res.height;
|
||||
num = res.depth;
|
||||
});
|
||||
|
||||
cp = imagemagick.convert(str, num, (err: Error, res: any) => {
|
||||
|
||||
});
|
||||
|
||||
cp = imagemagick.resize({
|
||||
width: num,
|
||||
height: num
|
||||
}, (err: Error, res: any) => {
|
||||
|
||||
});
|
||||
59
imagemagick/imagemagick.d.ts
vendored
Normal file
59
imagemagick/imagemagick.d.ts
vendored
Normal file
@@ -0,0 +1,59 @@
|
||||
// Type definitions for imagemagick
|
||||
// Project: http://github.com/rsms/node-imagemagick
|
||||
// Definitions by: Carlos Ballesteros Velasco <https://github.com/soywiz>
|
||||
// Definitions: https://github.com/borisyankov/DefinitelyTyped
|
||||
|
||||
// Imported from: https://github.com/soywiz/typescript-node-definitions/imagemagick.d.ts
|
||||
|
||||
/// <reference path="../node/node.d.ts" />
|
||||
|
||||
declare module "imagemagick" {
|
||||
import child_process = require("child_process");
|
||||
|
||||
export function identify(path: string, callback: (err: Error, features: Features) => void): child_process.ChildProcess;
|
||||
export function identify(path: any[], callback: (err: Error, result: string) => void): child_process.ChildProcess;
|
||||
export module identify {
|
||||
export var path: string;
|
||||
}
|
||||
export function readMetadata(path: string, callback: (err: Error, result: any) => void): child_process.ChildProcess;
|
||||
|
||||
export function convert(args: any, callback: (err: Error, result: any) => void): child_process.ChildProcess;
|
||||
export function convert(args: any, timeout: number, callback: (err: Error, result: any) => void): child_process.ChildProcess;
|
||||
export module convert {
|
||||
export var path: string;
|
||||
}
|
||||
|
||||
export function resize(options: Options, callback: (err: Error, result: any) => void): child_process.ChildProcess;
|
||||
export function crop(options: Options, callback: (err: Error, result: any) => void): child_process.ChildProcess;
|
||||
export function resizeArgs(options: Options): ResizeArgs;
|
||||
|
||||
export interface Features {
|
||||
format?: string;
|
||||
width?: number;
|
||||
height?: number;
|
||||
depth?: number;
|
||||
}
|
||||
|
||||
export interface Options {
|
||||
srcPath?: string; //: null,
|
||||
srcData?: string; //: null,
|
||||
srcFormat?: string; //: null,
|
||||
dstPath?: string; //: null,
|
||||
quality?: number; //: 0.8,
|
||||
format?: string; //: 'jpg',
|
||||
progressive?: boolean; //: false,
|
||||
colorspace?: any; //: null,
|
||||
width?: number; //: 0,
|
||||
height?: number; //: 0,
|
||||
strip?: boolean; //: true,
|
||||
filter?: string; //: 'Lagrange',
|
||||
sharpening?: number; //: 0.2,
|
||||
customArgs?: any[]; //: [],
|
||||
timeout?: number; //: 0
|
||||
}
|
||||
|
||||
export interface ResizeArgs {
|
||||
opt: Options;
|
||||
args: string[];
|
||||
}
|
||||
}
|
||||
24
memory-cache/memory-cache-tests.ts
Normal file
24
memory-cache/memory-cache-tests.ts
Normal file
@@ -0,0 +1,24 @@
|
||||
/// <reference path="memory-cache.d.ts" />
|
||||
|
||||
import memoryCache = require('memory-cache');
|
||||
|
||||
var key: any;
|
||||
var value: any;
|
||||
var bool: boolean;
|
||||
var num: number;
|
||||
|
||||
memoryCache.put(key, value);
|
||||
memoryCache.put(key, value, num);
|
||||
memoryCache.put(key, value, num, (key) => {
|
||||
|
||||
});
|
||||
value = memoryCache.get(key);
|
||||
memoryCache.del(key);
|
||||
memoryCache.clear();
|
||||
|
||||
num = memoryCache.size();
|
||||
num = memoryCache.memsize();
|
||||
|
||||
memoryCache.debug(bool);
|
||||
num = memoryCache.hits();
|
||||
num = memoryCache.misses();
|
||||
20
memory-cache/memory-cache.d.ts
vendored
Normal file
20
memory-cache/memory-cache.d.ts
vendored
Normal file
@@ -0,0 +1,20 @@
|
||||
// Type definitions for memory-cache
|
||||
// Project: http://github.com/ptarjan/node-cache
|
||||
// Definitions by: Jeff Goddard <https://github.com/jedigo>
|
||||
// Definitions: https://github.com/borisyankov/DefinitelyTyped
|
||||
|
||||
// Imported from: https://github.com/soywiz/typescript-node-definitions/memory-cache.d.ts
|
||||
|
||||
declare module "memory-cache" {
|
||||
export function put(key: any, value: any, time?: number, timeoutCallback?: (key: any) => void): void;
|
||||
export function get(key: any): any;
|
||||
export function del(key: any): void;
|
||||
export function clear(): void;
|
||||
|
||||
export function size(): number;
|
||||
export function memsize(): number;
|
||||
|
||||
export function debug(bool: boolean): void;
|
||||
export function hits(): number;
|
||||
export function misses(): number;
|
||||
}
|
||||
13
mime/mime-tests.ts
Normal file
13
mime/mime-tests.ts
Normal file
@@ -0,0 +1,13 @@
|
||||
/// <reference path="mime.d.ts" />
|
||||
|
||||
import mime = require('mime');
|
||||
|
||||
var str: string;
|
||||
var obj: Object;
|
||||
|
||||
str = mime.lookup(str);
|
||||
str = mime.extension(str);
|
||||
mime.load(str);
|
||||
mime.define(obj);
|
||||
|
||||
str = mime.charsets.lookup(str);
|
||||
19
mime/mime.d.ts
vendored
Normal file
19
mime/mime.d.ts
vendored
Normal file
@@ -0,0 +1,19 @@
|
||||
// Type definitions for mime
|
||||
// Project: https://github.com/broofa/node-mime
|
||||
// Definitions by: Jeff Goddard <https://github.com/jedigo>
|
||||
// Definitions: https://github.com/borisyankov/DefinitelyTyped
|
||||
|
||||
// Imported from: https://github.com/soywiz/typescript-node-definitions/mime.d.ts
|
||||
|
||||
declare module "mime" {
|
||||
export function lookup(path: string): string;
|
||||
export function extension(mime: string): string;
|
||||
export function load(filepath: string): void;
|
||||
export function define(mimes: Object): void;
|
||||
|
||||
interface Charsets {
|
||||
lookup(mime: string): string;
|
||||
}
|
||||
|
||||
export var charsets: Charsets;
|
||||
}
|
||||
32
mu2/mu2-tests.ts
Normal file
32
mu2/mu2-tests.ts
Normal file
@@ -0,0 +1,32 @@
|
||||
/// <reference path="mu2.d.ts" />
|
||||
/// <reference path="../node/node.d.ts" />
|
||||
|
||||
import mu2 = require('mu2');
|
||||
import stream = require('stream');
|
||||
|
||||
var str: string;
|
||||
var value: any;
|
||||
var read: ReadableStream;
|
||||
var parsed: mu2.IParsed;
|
||||
|
||||
str = mu2.root;
|
||||
|
||||
read = mu2.compileAndRender(str, value);
|
||||
|
||||
mu2.compile(str, (err: Error, parsed: mu2.IParsed) => {
|
||||
|
||||
});
|
||||
mu2.compileText(str, str, (err: Error, parsed: mu2.IParsed) => {
|
||||
|
||||
});
|
||||
parsed = mu2.compileText(str, str);
|
||||
parsed = mu2.compileText(str);
|
||||
|
||||
read = mu2.render(str, value);
|
||||
read = mu2.render(parsed, value);
|
||||
|
||||
read = mu2.renderText(str, value);
|
||||
read = mu2.renderText(str, value, value);
|
||||
|
||||
mu2.clearCache();
|
||||
mu2.clearCache(str);
|
||||
29
mu2/mu2.d.ts
vendored
Normal file
29
mu2/mu2.d.ts
vendored
Normal file
@@ -0,0 +1,29 @@
|
||||
// Type definitions for mu2
|
||||
// Project: http://github.com/raycmorgan/mu
|
||||
// Definitions by: Jeff Goddard <https://github.com/jedigo>
|
||||
// Definitions: https://github.com/borisyankov/DefinitelyTyped
|
||||
|
||||
// Imported from: https://github.com/soywiz/typescript-node-definitions/mu2.d.ts
|
||||
|
||||
/// <reference path="../node/node.d.ts" />
|
||||
|
||||
declare module "mu2" {
|
||||
export var root: string;
|
||||
|
||||
export function compileAndRender(templateName: string, view: any): ReadableStream;
|
||||
|
||||
export function compile(filename: string, callback: (err: Error, parsed: IParsed) => void): void;
|
||||
|
||||
export function compileText(name: string, template: string, callback: (err: Error, parsed: IParsed) => void): void;
|
||||
export function compileText(name: string, template: string): IParsed;
|
||||
export function compileText(template: string): IParsed;
|
||||
|
||||
export function render(filenameOrParsed: string, view: any): ReadableStream;
|
||||
export function render(filenameOrParsed: IParsed, view: any): ReadableStream;
|
||||
|
||||
export function renderText(template: string, view: any, partials?: any): ReadableStream;
|
||||
|
||||
export function clearCache(templateName?: string): void;
|
||||
|
||||
export interface IParsed { }
|
||||
}
|
||||
101
nconf/nconf-tests.ts
Normal file
101
nconf/nconf-tests.ts
Normal file
@@ -0,0 +1,101 @@
|
||||
/// <reference path="nconf.d.ts" />
|
||||
|
||||
import nconf = require('nconf');
|
||||
|
||||
var value: any;
|
||||
var num: number;
|
||||
var bool: boolean;
|
||||
var valueArr: any[];
|
||||
var str: string;
|
||||
var strArr: string[];
|
||||
var p: nconf.Provider;
|
||||
var opts: nconf.IOptions;
|
||||
var fopts: nconf.IFileOptions;
|
||||
var store: nconf.IStore;
|
||||
var callback: (err: Error) => void;
|
||||
|
||||
value = nconf.clear(str, callback);
|
||||
value = nconf.get (str, callback);
|
||||
value = nconf.merge(str, value, callback);
|
||||
value = nconf.set (str, value, callback);
|
||||
value = nconf.reset(callback);
|
||||
|
||||
value = nconf.load(callback);
|
||||
nconf.mergeSources(value);
|
||||
value = nconf.loadSources();
|
||||
value = nconf.save(value, callback);
|
||||
|
||||
p = nconf.add(str);
|
||||
p = nconf.add(str, opts);;
|
||||
|
||||
p = nconf.argv();
|
||||
p = nconf.argv(opts);
|
||||
|
||||
p = nconf.env();
|
||||
p = nconf.env(opts);
|
||||
|
||||
p = nconf.file(str);
|
||||
p = nconf.file(str, fopts);
|
||||
p = nconf.file(fopts);
|
||||
|
||||
p = nconf.use(str);
|
||||
p = nconf.use(str, opts);
|
||||
|
||||
p = nconf.defaults();
|
||||
p = nconf.defaults(opts);
|
||||
|
||||
nconf.init();
|
||||
nconf.init(opts);
|
||||
|
||||
p = nconf.overrides();
|
||||
p = nconf.overrides(opts);
|
||||
nconf.remove(str);
|
||||
store = nconf.create(str, opts);
|
||||
|
||||
str = nconf.key(value, value);
|
||||
valueArr = nconf.path(value);
|
||||
nconf.loadFiles(value, callback);
|
||||
nconf.loadFilesSync(value, callback);
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
|
||||
str = store.type;
|
||||
value = store.get(str);
|
||||
bool = store.set(str, value);
|
||||
bool = store.clear(str);
|
||||
bool = store.merge(str, value);
|
||||
bool = store.reset(callback);
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
|
||||
p = new nconf.Provider(opts);
|
||||
value = p.stores;
|
||||
valueArr = p.sources;
|
||||
|
||||
value = p.clear(str, callback);
|
||||
value = p.get(str, callback);
|
||||
value = p.merge(str,value,callback);
|
||||
value = p.set(str,value,callback);
|
||||
value = p.reset(callback);
|
||||
|
||||
value = p.load(callback);
|
||||
p.mergeSources(value);
|
||||
value = p.loadSources();
|
||||
value = p.save(value, callback);
|
||||
|
||||
p = p.add(str);
|
||||
p = p.add(str, opts);
|
||||
p = p.argv();
|
||||
p = p.argv(opts);
|
||||
p = p.env();
|
||||
p = p.env(opts);
|
||||
p = p.file(str);
|
||||
p = p.file(str, fopts);
|
||||
p = p.file(fopts);
|
||||
p = p.use(str, opts);
|
||||
|
||||
p = p.defaults(opts);
|
||||
p.init(opts);
|
||||
p = p.overrides(opts);
|
||||
p.remove(str);
|
||||
store = p.create(str, opts);
|
||||
100
nconf/nconf.d.ts
vendored
Normal file
100
nconf/nconf.d.ts
vendored
Normal file
@@ -0,0 +1,100 @@
|
||||
// Type definitions for nconf
|
||||
// Project: https://github.com/flatiron/nconf
|
||||
// Definitions by: Jeff Goddard <https://github.com/jedigo>
|
||||
// Definitions: https://github.com/borisyankov/DefinitelyTyped
|
||||
|
||||
// Imported from: https://github.com/soywiz/typescript-node-definitions/nconf.d.ts
|
||||
|
||||
declare module "nconf" {
|
||||
export var version: number;
|
||||
export var stores: any;
|
||||
export var sources: any[];
|
||||
|
||||
export function clear(key: string, callback?: ICallbackFunction): any;
|
||||
export function get (key: string, callback?: ICallbackFunction): any;
|
||||
export function merge(key: string, value: any, callback?: ICallbackFunction): any;
|
||||
export function set (key: string, value: any, callback?: ICallbackFunction): any;
|
||||
export function reset(callback?: ICallbackFunction): any;
|
||||
|
||||
export function load(callback?: ICallbackFunction): any;
|
||||
export function mergeSources(data: any): void;
|
||||
export function loadSources(): any;
|
||||
export function save(value: any, callback?: ICallbackFunction): any;
|
||||
|
||||
export function add(name: string, options?: IOptions): Provider;
|
||||
export function argv(options?: IOptions): Provider;
|
||||
export function env(options?: IOptions): Provider;
|
||||
export function file(name: string, options?: IFileOptions): Provider;
|
||||
export function file(options: IFileOptions): Provider;
|
||||
export function use(name: string, options?: IOptions): Provider;
|
||||
export function defaults(options?: IOptions): Provider;
|
||||
export function init(options?: IOptions): void;
|
||||
export function overrides(options?: IOptions): Provider;
|
||||
export function remove(name: string): void;
|
||||
export function create(name: string, options: IOptions): IStore;
|
||||
|
||||
export function key(...values: any[]): string;
|
||||
export function path(key: any): any[];
|
||||
export function loadFiles(files: any, callback?: ICallbackFunction): void;
|
||||
export function loadFilesSync(files: any, callback?: ICallbackFunction): void;
|
||||
|
||||
export enum formats {
|
||||
json,
|
||||
ini
|
||||
}
|
||||
|
||||
export interface IOptions {
|
||||
type?: string;
|
||||
}
|
||||
|
||||
export interface IFileOptions extends IOptions {
|
||||
file?: string;
|
||||
dir?: string;
|
||||
search?: boolean;
|
||||
json_spacing?: number;
|
||||
}
|
||||
|
||||
export interface ICallbackFunction {
|
||||
(err: Error): void;
|
||||
}
|
||||
|
||||
export class Provider {
|
||||
constructor(options: IOptions);
|
||||
|
||||
stores: any;
|
||||
sources: any[];
|
||||
|
||||
clear(key: string, callback?: ICallbackFunction): any;
|
||||
get (key: string, callback?: ICallbackFunction): any;
|
||||
merge(key: string, value: any, callback?: ICallbackFunction): any;
|
||||
set (key: string, value: any, callback?: ICallbackFunction): any;
|
||||
reset(callback?: ICallbackFunction): any;
|
||||
|
||||
load(callback?: ICallbackFunction): any;
|
||||
mergeSources(data: any): void;
|
||||
loadSources(): any;
|
||||
save(value: any, callback?: ICallbackFunction): any;
|
||||
|
||||
add(name: string, options?: IOptions): Provider;
|
||||
argv(options?: IOptions): Provider;
|
||||
env(options?: IOptions): Provider;
|
||||
file(name: string, options?: IFileOptions): Provider;
|
||||
file(options: IFileOptions): Provider;
|
||||
use(name: string, options?: IOptions): Provider;
|
||||
|
||||
defaults(options?: IOptions): Provider;
|
||||
init(options?: IOptions): void;
|
||||
overrides(options?: IOptions): Provider;
|
||||
remove(name: string): void;
|
||||
create(name: string, options: IOptions): IStore;
|
||||
}
|
||||
|
||||
export interface IStore {
|
||||
type: string;
|
||||
get (key: string): any;
|
||||
set (key: string, value: any): boolean;
|
||||
clear(key: string): boolean;
|
||||
merge(key: string, value: any): boolean;
|
||||
reset(callback?: ICallbackFunction): boolean;
|
||||
}
|
||||
}
|
||||
60
nock/nock-tests.ts
Normal file
60
nock/nock-tests.ts
Normal file
@@ -0,0 +1,60 @@
|
||||
/// <reference path="nock.d.ts" />
|
||||
|
||||
import nock = require('nock');
|
||||
|
||||
var inst: nock.Scope;
|
||||
var str: string;
|
||||
var bool: boolean;
|
||||
var data: string;
|
||||
var num: number;
|
||||
var value: any;
|
||||
var regex: RegExp;
|
||||
var options: nock.Options;
|
||||
var headers: Object;
|
||||
|
||||
inst = inst.head(str);
|
||||
inst = inst.get(str);
|
||||
inst = inst.get(str, data);
|
||||
inst = inst.post(str);
|
||||
inst = inst.post(str, data);
|
||||
inst = inst.put(str);
|
||||
inst = inst.put(str, data);
|
||||
|
||||
inst = inst.delete(str);
|
||||
inst = inst.delete(str, data);
|
||||
|
||||
inst = inst.intercept(str, str);
|
||||
inst = inst.intercept(str, str, str);
|
||||
inst = inst.intercept(str, str, str, value);
|
||||
|
||||
inst = inst.reply(num);
|
||||
inst = inst.reply(num, str);
|
||||
inst = inst.reply(num, str, headers);
|
||||
inst = inst.reply(num, (uri: string, body: string) => {
|
||||
return str;
|
||||
});
|
||||
inst = inst.reply(num, (uri: string, body: string) => {
|
||||
return str;
|
||||
}, headers);
|
||||
inst = inst.replyWithFile(num, str);
|
||||
|
||||
inst = inst.defaultReplyHeaders(value);
|
||||
inst = inst.matchHeader(str, str);
|
||||
|
||||
inst = inst.filteringPath(regex, str);
|
||||
inst = inst.filteringPath((path: string) => {
|
||||
return str;
|
||||
});
|
||||
inst = inst.filteringRequestBody(regex, str);
|
||||
inst = inst.filteringRequestBody((path: string) => {
|
||||
return str;
|
||||
});
|
||||
|
||||
inst = inst.persist();
|
||||
inst = inst.log(() => {
|
||||
|
||||
});
|
||||
|
||||
inst.done();
|
||||
bool = inst.isDone();
|
||||
inst.restore();
|
||||
54
nock/nock.d.ts
vendored
Normal file
54
nock/nock.d.ts
vendored
Normal file
@@ -0,0 +1,54 @@
|
||||
// Type definitions for nock
|
||||
// Project: https://github.com/pgte/nock
|
||||
// Definitions by: bonnici <https://github.com/bonnici>
|
||||
// Definitions: https://github.com/borisyankov/DefinitelyTyped
|
||||
|
||||
// Imported from: https://github.com/soywiz/typescript-node-definitions/nock.d.ts
|
||||
|
||||
declare module "nock" {
|
||||
export = nock;
|
||||
|
||||
function nock (host: string, options?: nock.Options): nock.Scope;
|
||||
|
||||
module nock {
|
||||
export function cleanAll(): void;
|
||||
export var recorder: Recorder;
|
||||
|
||||
export interface Scope {
|
||||
get(path: string, data?: string): Scope;
|
||||
post(path: string, data?: string): Scope;
|
||||
put(path: string, data?: string): Scope;
|
||||
head(path: string): Scope;
|
||||
delete(path: string, data?: string): Scope;
|
||||
intercept(path: string, verb: string, body?: string, options?: any): Scope;
|
||||
|
||||
reply(responseCode: number, body?: string, headers?: Object): Scope;
|
||||
reply(responseCode: number, callback: (uri: string, body: string) => string, headers?: Object): Scope;
|
||||
replyWithFile(responseCode: number, fileName: string): Scope;
|
||||
|
||||
defaultReplyHeaders(headers: Object): Scope;
|
||||
matchHeader(name: string, value: string): Scope;
|
||||
|
||||
filteringPath(regex: RegExp, replace: string): Scope;
|
||||
filteringPath(fn: (path: string) => string): Scope;
|
||||
filteringRequestBody(regex: RegExp, replace: string): Scope;
|
||||
filteringRequestBody(fn: (path: string) => string): Scope;
|
||||
|
||||
persist(): Scope;
|
||||
log(out: () => void): Scope;
|
||||
|
||||
done(): void;
|
||||
isDone(): boolean;
|
||||
restore(): void;
|
||||
}
|
||||
|
||||
export interface Recorder {
|
||||
rec(capture?: boolean): void;
|
||||
play(): string[];
|
||||
}
|
||||
|
||||
export interface Options {
|
||||
allowUnmocked?: boolean;
|
||||
}
|
||||
}
|
||||
}
|
||||
49
node-uuid/node-uuid.d.ts
vendored
Normal file
49
node-uuid/node-uuid.d.ts
vendored
Normal file
@@ -0,0 +1,49 @@
|
||||
// Type definitions for node-uuid.js
|
||||
// Project: https://github.com/broofa/node-uuid
|
||||
// Definitions by: Jeff May <https://github.com/jeffmay>
|
||||
// Definitions: https://github.com/borisyankov/DefinitelyTyped
|
||||
|
||||
/// <reference path="../node/node.d.ts" />
|
||||
|
||||
interface UUIDOptions {
|
||||
|
||||
/**
|
||||
* Node id as Array of 6 bytes (per 4.1.6).
|
||||
* Default: Randomly generated ID. See note 1.
|
||||
*/
|
||||
node: any[]
|
||||
|
||||
/**
|
||||
* (Number between 0 - 0x3fff) RFC clock sequence.
|
||||
* Default: An internally maintained clockseq is used.
|
||||
*/
|
||||
clockseq: number
|
||||
|
||||
/**
|
||||
* (Number | Date) Time in milliseconds since unix Epoch.
|
||||
* Default: The current time is used.
|
||||
*/
|
||||
msecs: any
|
||||
|
||||
/**
|
||||
* (Number between 0-9999) additional time, in 100-nanosecond units. Ignored if msecs is unspecified.
|
||||
* Default: internal uuid counter is used, as per 4.2.1.2.
|
||||
*/
|
||||
nsecs: number
|
||||
}
|
||||
|
||||
interface UUID {
|
||||
v1(options?: UUIDOptions, buffer?: number[], offset?: number): string
|
||||
v1(options?: UUIDOptions, buffer?: NodeBuffer, offset?: number): string
|
||||
|
||||
v2(options?: UUIDOptions, buffer?: number[], offset?: number): string
|
||||
v2(options?: UUIDOptions, buffer?: NodeBuffer, offset?: number): string
|
||||
|
||||
v3(options?: UUIDOptions, buffer?: number[], offset?: number): string
|
||||
v3(options?: UUIDOptions, buffer?: NodeBuffer, offset?: number): string
|
||||
|
||||
v4(options?: UUIDOptions, buffer?: number[], offset?: number): string
|
||||
v4(options?: UUIDOptions, buffer?: NodeBuffer, offset?: number): string
|
||||
}
|
||||
|
||||
declare var uuid: UUID;
|
||||
22
node-uuid/node-uuid.tests.ts
Normal file
22
node-uuid/node-uuid.tests.ts
Normal file
@@ -0,0 +1,22 @@
|
||||
/// <reference path="node-uuid.d.ts" />
|
||||
|
||||
var uid1: string = uuid.v1()
|
||||
var uid2: string = uuid.v2()
|
||||
var uid3: string = uuid.v3()
|
||||
var uid4: string = uuid.v4()
|
||||
|
||||
var options: UUIDOptions = {
|
||||
node: [],
|
||||
clockseq: 2,
|
||||
nsecs: 3,
|
||||
msecs: new Date()
|
||||
}
|
||||
|
||||
var padding: number[] = [0, 1, 2]
|
||||
|
||||
var offset: number = 15
|
||||
|
||||
uuid.v1(options, padding, offset)
|
||||
uuid.v2(options, padding, offset)
|
||||
uuid.v3(options, padding, offset)
|
||||
uuid.v4(options, padding, offset)
|
||||
59
nodeunit/nodeunit-tests.ts
Normal file
59
nodeunit/nodeunit-tests.ts
Normal file
@@ -0,0 +1,59 @@
|
||||
/// <reference path="nodeunit.d.ts" />
|
||||
|
||||
import nodeunit = require('nodeunit');
|
||||
|
||||
var num: number;
|
||||
var value: any;
|
||||
var actual: any;
|
||||
var expected: any;
|
||||
var message: string;
|
||||
var operator: string;
|
||||
var error: any;
|
||||
var block: () =>{
|
||||
|
||||
};
|
||||
|
||||
export var testGroup: nodeunit.ITestGroup = {
|
||||
setUp: function (callback: nodeunit.ICallbackFunction) {
|
||||
callback();
|
||||
},
|
||||
tearDown: function (callback: nodeunit.ICallbackFunction) {
|
||||
callback();
|
||||
},
|
||||
test1: function (test: nodeunit.Test) {
|
||||
test.expect(num);
|
||||
|
||||
test.fail(actual, expected, message, operator);
|
||||
test.assert(value, message);
|
||||
test.ok(value);
|
||||
test.ok(value, message);
|
||||
test.equal(actual, expected);
|
||||
test.equal(actual, expected, message);
|
||||
test.notEqual(actual, expected);
|
||||
test.notEqual(actual, expected, message);
|
||||
test.deepEqual(actual, expected);
|
||||
test.deepEqual(actual, expected, message);
|
||||
test.notDeepEqual(actual, expected);
|
||||
test.notDeepEqual(actual, expected, message);
|
||||
test.strictEqual(actual, expected);
|
||||
test.strictEqual(actual, expected, message);
|
||||
test.notStrictEqual(actual, expected);
|
||||
test.notStrictEqual(actual, expected, message);
|
||||
test.throws(block);
|
||||
test.throws(block, error);
|
||||
test.throws(block, error, message);
|
||||
test.doesNotThrow(block);
|
||||
test.doesNotThrow(block, error);
|
||||
test.doesNotThrow(block, error, message);
|
||||
test.ifError(value);
|
||||
|
||||
//assertion wrappers
|
||||
test.equals(actual, expected);
|
||||
test.equals(actual, expected, message);
|
||||
test.same(actual, expected);
|
||||
test.same(actual, expected, message);
|
||||
|
||||
test.done(error);
|
||||
test.done();
|
||||
}
|
||||
};
|
||||
59
nodeunit/nodeunit.d.ts
vendored
Normal file
59
nodeunit/nodeunit.d.ts
vendored
Normal file
@@ -0,0 +1,59 @@
|
||||
// Type definitions for nodeunit
|
||||
// Project: https://github.com/caolan/nodeunit
|
||||
// Definitions by: Jeff Goddard <https://github.com/jedigo>
|
||||
// Definitions: https://github.com/borisyankov/DefinitelyTyped
|
||||
|
||||
// Imported from: https://github.com/soywiz/typescript-node-definitions/nodeunit.d.ts
|
||||
|
||||
declare module 'nodeunit' {
|
||||
export interface Test {
|
||||
done: ICallbackFunction;
|
||||
expect(num: number): void;
|
||||
|
||||
//assersions from node assert module
|
||||
fail(actual: any, expected: any, message: string, operator: string): void;
|
||||
assert(value: any, message: string): void;
|
||||
ok(value: any, message?: string): void;
|
||||
equal(actual: any, expected: any, message?: string): void;
|
||||
notEqual(actual: any, expected: any, message?: string): void;
|
||||
deepEqual(actual: any, expected: any, message?: string): void;
|
||||
notDeepEqual(actual: any, expected: any, message?: string): void;
|
||||
strictEqual(actual: any, expected: any, message?: string): void;
|
||||
notStrictEqual(actual: any, expected: any, message?: string): void;
|
||||
throws(block: any, error?: any, message?: string): void;
|
||||
doesNotThrow(block: any, error?: any, message?: string): void;
|
||||
ifError(value: any): void;
|
||||
|
||||
//assertion wrappers
|
||||
equals(actual: any, expected: any, message?: string): void;
|
||||
same(actual: any, expected: any, message?: string): void;
|
||||
}
|
||||
|
||||
// Test Group Usage:
|
||||
// var testGroup: nodeunit.ITestGroup = {
|
||||
// setUp: function (callback: nodeunit.ICallbackFunction): void {
|
||||
// callback();
|
||||
// },
|
||||
// tearDown: function (callback: nodeunit.ICallbackFunction): void {
|
||||
// callback();
|
||||
// },
|
||||
// test1: function (test: nodeunit.Test): void {
|
||||
// test.done();
|
||||
// }
|
||||
// }
|
||||
// exports.testgroup = testGroup;
|
||||
|
||||
export interface ITestBody {
|
||||
(callback: Test): void;
|
||||
}
|
||||
|
||||
export interface ITestGroup {
|
||||
setUp?: (callback: ICallbackFunction) => void;
|
||||
tearDown?: (callback: ICallbackFunction) => void;
|
||||
}
|
||||
|
||||
export interface ICallbackFunction {
|
||||
(err?: any): void;
|
||||
}
|
||||
}
|
||||
|
||||
46
optimist/optimist-tests.ts
Normal file
46
optimist/optimist-tests.ts
Normal file
@@ -0,0 +1,46 @@
|
||||
/// <reference path="optimist.d.ts" />
|
||||
|
||||
import optimist = require('optimist');
|
||||
|
||||
var fn: Function;
|
||||
var str: string;
|
||||
var value: any;
|
||||
var num: number;
|
||||
var bool: boolean;
|
||||
var strArr: string[];
|
||||
|
||||
var argv: optimist.Argv;
|
||||
var opt: optimist.Optimist;
|
||||
|
||||
argv = opt.argv;
|
||||
argv = opt.argv;
|
||||
argv = optimist(strArr).argv;
|
||||
|
||||
opt = optimist(strArr).default(str, value);
|
||||
opt = optimist(strArr).default({});
|
||||
|
||||
opt = optimist(strArr).boolean(str);
|
||||
opt = optimist(strArr).boolean(strArr);
|
||||
|
||||
opt = optimist(strArr).string(str);
|
||||
opt = optimist(strArr).string(strArr);
|
||||
|
||||
opt = opt.wrap(num);
|
||||
|
||||
opt.help();
|
||||
opt.showHelp(fn);
|
||||
|
||||
opt = opt.usage(str);
|
||||
|
||||
opt = opt.demand(str);
|
||||
opt = opt.demand(num);
|
||||
opt = opt.demand(strArr);
|
||||
|
||||
opt = opt.alias(str, str);
|
||||
|
||||
opt = opt.describe(str, str);
|
||||
|
||||
opt = opt.options(str, Object);
|
||||
|
||||
opt.check(fn);
|
||||
opt = opt.parse(strArr);
|
||||
53
optimist/optimist.d.ts
vendored
Normal file
53
optimist/optimist.d.ts
vendored
Normal file
@@ -0,0 +1,53 @@
|
||||
// Type definitions for optimist
|
||||
// Project: https://github.com/substack/node-optimist
|
||||
// Definitions by: Carlos Ballesteros Velasco <https://github.com/soywiz>
|
||||
// Definitions: https://github.com/borisyankov/DefinitelyTyped
|
||||
|
||||
// Imported from: https://github.com/soywiz/typescript-node-definitions/optimist.d.ts
|
||||
|
||||
declare module "optimist" {
|
||||
|
||||
function optimist(args: string[]): optimist.Optimist;
|
||||
|
||||
module optimist {
|
||||
export interface Optimist {
|
||||
default(name: string, value: any): Optimist;
|
||||
default(args: Object): Optimist;
|
||||
|
||||
boolean(name: string): Optimist;
|
||||
boolean(names: string[]): Optimist;
|
||||
|
||||
string(name: string): Optimist;
|
||||
string(names: string[]): Optimist;
|
||||
|
||||
wrap(columns: number): Optimist;
|
||||
|
||||
help(): void;
|
||||
showHelp(fn: Function): void;
|
||||
|
||||
usage(message: string): Optimist;
|
||||
|
||||
demand(key: string): Optimist;
|
||||
demand(key: number): Optimist;
|
||||
demand(key: string[]): Optimist;
|
||||
|
||||
alias(key: string, alias: string): Optimist;
|
||||
|
||||
describe(key: string, desc: string): Optimist;
|
||||
|
||||
options(key: string, opt: Object): Optimist;
|
||||
|
||||
check(fn: Function): void;
|
||||
|
||||
parse(args: string[]): Optimist;
|
||||
|
||||
argv: Argv;
|
||||
}
|
||||
|
||||
export interface Argv extends Object {
|
||||
_: string[];
|
||||
}
|
||||
}
|
||||
|
||||
export = optimist;
|
||||
}
|
||||
62
redis/redis-tests.ts
Normal file
62
redis/redis-tests.ts
Normal file
@@ -0,0 +1,62 @@
|
||||
/// <reference path="redis.d.ts" />
|
||||
|
||||
import redis = require('redis');
|
||||
|
||||
var value: any;
|
||||
var valueArr: any[];
|
||||
var num: number;
|
||||
var str: string;
|
||||
var bool: boolean;
|
||||
var err: Error;
|
||||
var args: any[];
|
||||
var options: redis.ClientOpts;
|
||||
var client: redis.RedisClient;
|
||||
var info: redis.ServerInfo;
|
||||
var resCallback: (err: Error, res: any) => void;
|
||||
var numCallback: (err: Error, res: number) => void;
|
||||
var strCallback: (err: Error, res: string) => void;
|
||||
var messageHandler: (channel: string, message: any) => void;
|
||||
|
||||
// ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ----
|
||||
|
||||
bool = redis.debug_mode;
|
||||
redis.print(err, value);
|
||||
|
||||
// ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ----
|
||||
|
||||
client = redis.createClient(num, str, options);
|
||||
|
||||
bool = client.connected;
|
||||
num = client.retry_delay;
|
||||
num = client.retry_backoff;
|
||||
valueArr = client.command_queue;
|
||||
valueArr = client.offline_queue;
|
||||
info = client.server_info;
|
||||
|
||||
// ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ----
|
||||
|
||||
client.end();
|
||||
|
||||
// Connection (http://redis.io/commands#connection)
|
||||
client.auth(str, resCallback);
|
||||
client.ping(numCallback);
|
||||
|
||||
// Strings (http://redis.io/commands#strings)
|
||||
client.append(str, str, numCallback);
|
||||
client.bitcount(str, numCallback);
|
||||
client.bitcount(str, num, num, numCallback);
|
||||
client.set(str, str, strCallback);
|
||||
client.get(str, strCallback);
|
||||
client.exists(str, str, numCallback);
|
||||
|
||||
client.publish(str, value);
|
||||
client.subscribe(str);
|
||||
client.on(str, messageHandler);
|
||||
|
||||
// ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ----
|
||||
|
||||
// some of the bulk methods
|
||||
client.get(args);
|
||||
client.get(args, resCallback);
|
||||
client.set(args);
|
||||
client.set(args, resCallback);
|
||||
224
redis/redis.d.ts
vendored
Normal file
224
redis/redis.d.ts
vendored
Normal file
@@ -0,0 +1,224 @@
|
||||
// Type definitions for redis
|
||||
// Project: https://github.com/mranney/node_redis
|
||||
// Definitions by: Carlos Ballesteros Velasco <https://github.com/soywiz>
|
||||
// Definitions: https://github.com/borisyankov/DefinitelyTyped
|
||||
|
||||
// Imported from: https://github.com/soywiz/typescript-node-definitions/redis.d.ts
|
||||
|
||||
declare module "redis" {
|
||||
export function createClient(port_arg: number, host_arg: string, options: ClientOpts): RedisClient;
|
||||
export function print(err: Error, reply: any): void;
|
||||
export var debug_mode: boolean;
|
||||
|
||||
interface MessageHandler {
|
||||
(channel: string, message: any): void;
|
||||
}
|
||||
|
||||
interface ResCallback {
|
||||
(err: Error, res: any): void;
|
||||
}
|
||||
|
||||
interface NumCallback {
|
||||
(err: Error, reply: number): void;
|
||||
}
|
||||
|
||||
interface StringCallback {
|
||||
(err: Error, reply: string): void;
|
||||
}
|
||||
|
||||
interface ServerInfo {
|
||||
redis_version: string;
|
||||
versions: number[];
|
||||
}
|
||||
|
||||
interface ClientOpts {
|
||||
parser: string;
|
||||
return_buffers?: boolean;
|
||||
detect_buffers?: boolean;
|
||||
socket_nodelay?: boolean;
|
||||
no_ready_check?: boolean;
|
||||
enable_offline_queue?: boolean;
|
||||
retry_max_delay?: number;
|
||||
connect_timeout?: number;
|
||||
max_attempts?: number;
|
||||
auth_pass?: boolean;
|
||||
}
|
||||
|
||||
interface RedisClient {
|
||||
// event: connect
|
||||
// event: error
|
||||
// event: message
|
||||
// event: pmessage
|
||||
// event: subscribe
|
||||
// event: psubscribe
|
||||
// event: unsubscribe
|
||||
// event: punsubscribe
|
||||
|
||||
connected: boolean;
|
||||
retry_delay: number;
|
||||
retry_backoff: number;
|
||||
command_queue: any[];
|
||||
offline_queue: any[];
|
||||
server_info: ServerInfo;
|
||||
|
||||
end(): void;
|
||||
|
||||
// Connection (http://redis.io/commands#connection)
|
||||
auth(password: string, callback?: ResCallback): void;
|
||||
ping(callback?: NumCallback): void;
|
||||
|
||||
// Strings (http://redis.io/commands#strings)
|
||||
append(key: string, value: string, callback?: NumCallback): void;
|
||||
bitcount(key: string, callback?: NumCallback): void;
|
||||
bitcount(key: string, start: number, end: number, callback?: NumCallback): void;
|
||||
set(key: string, value: string, callback?: StringCallback): void;
|
||||
get(key: string, callback?: StringCallback): void;
|
||||
exists(key: string, value: string, callback?: NumCallback): void;
|
||||
|
||||
publish(channel: string, value: any): void;
|
||||
subscribe(channel: string): void;
|
||||
on(channel: string, handler: MessageHandler): void;
|
||||
|
||||
/*
|
||||
commands = set_union([
|
||||
"get", "set", "setnx", "setex", "append", "strlen", "del", "exists", "setbit", "getbit", "setrange", "getrange", "substr",
|
||||
"incr", "decr", "mget", "rpush", "lpush", "rpushx", "lpushx", "linsert", "rpop", "lpop", "brpop", "brpoplpush", "blpop", "llen", "lindex",
|
||||
"lset", "lrange", "ltrim", "lrem", "rpoplpush", "sadd", "srem", "smove", "sismember", "scard", "spop", "srandmember", "sinter", "sinterstore",
|
||||
"sunion", "sunionstore", "sdiff", "sdiffstore", "smembers", "zadd", "zincrby", "zrem", "zremrangebyscore", "zremrangebyrank", "zunionstore",
|
||||
"zinterstore", "zrange", "zrangebyscore", "zrevrangebyscore", "zcount", "zrevrange", "zcard", "zscore", "zrank", "zrevrank", "hset", "hsetnx",
|
||||
"hget", "hmset", "hmget", "hincrby", "hdel", "hlen", "hkeys", "hvals", "hgetall", "hexists", "incrby", "decrby", "getset", "mset", "msetnx",
|
||||
"randomkey", "select", "move", "rename", "renamenx", "expire", "expireat", "keys", "dbsize", "auth", "ping", "echo", "save", "bgsave",
|
||||
"bgrewriteaof", "shutdown", "lastsave", "type", "multi", "exec", "discard", "sync", "flushdb", "flushall", "sort", "info", "monitor", "ttl",
|
||||
"persist", "slaveof", "debug", "config", "subscribe", "unsubscribe", "psubscribe", "punsubscribe", "publish", "watch", "unwatch", "cluster",
|
||||
"restore", "migrate", "dump", "object", "client", "eval", "evalsha"], require("./lib/commands"));
|
||||
*/
|
||||
|
||||
get(args: any[], callback?: ResCallback): void;
|
||||
set(args: any[], callback?: ResCallback): void;
|
||||
setnx(args: any[], callback?: ResCallback): void;
|
||||
setex(args: any[], callback?: ResCallback): void;
|
||||
append(args: any[], callback?: ResCallback): void;
|
||||
strlen(args: any[], callback?: ResCallback): void;
|
||||
del(args: any[], callback?: ResCallback): void;
|
||||
exists(args: any[], callback?: ResCallback): void;
|
||||
setbit(args: any[], callback?: ResCallback): void;
|
||||
getbit(args: any[], callback?: ResCallback): void;
|
||||
setrange(args: any[], callback?: ResCallback): void;
|
||||
getrange(args: any[], callback?: ResCallback): void;
|
||||
substr(args: any[], callback?: ResCallback): void;
|
||||
incr(args: any[], callback?: ResCallback): void;
|
||||
decr(args: any[], callback?: ResCallback): void;
|
||||
mget(args: any[], callback?: ResCallback): void;
|
||||
rpush(args: any[], callback?: ResCallback): void;
|
||||
lpush(args: any[], callback?: ResCallback): void;
|
||||
rpushx(args: any[], callback?: ResCallback): void;
|
||||
lpushx(args: any[], callback?: ResCallback): void;
|
||||
linsert(args: any[], callback?: ResCallback): void;
|
||||
rpop(args: any[], callback?: ResCallback): void;
|
||||
lpop(args: any[], callback?: ResCallback): void;
|
||||
brpop(args: any[], callback?: ResCallback): void;
|
||||
brpoplpush(args: any[], callback?: ResCallback): void;
|
||||
blpop(args: any[], callback?: ResCallback): void;
|
||||
llen(args: any[], callback?: ResCallback): void;
|
||||
lindex(args: any[], callback?: ResCallback): void;
|
||||
lset(args: any[], callback?: ResCallback): void;
|
||||
lrange(args: any[], callback?: ResCallback): void;
|
||||
ltrim(args: any[], callback?: ResCallback): void;
|
||||
lrem(args: any[], callback?: ResCallback): void;
|
||||
rpoplpush(args: any[], callback?: ResCallback): void;
|
||||
sadd(args: any[], callback?: ResCallback): void;
|
||||
srem(args: any[], callback?: ResCallback): void;
|
||||
smove(args: any[], callback?: ResCallback): void;
|
||||
sismember(args: any[], callback?: ResCallback): void;
|
||||
scard(args: any[], callback?: ResCallback): void;
|
||||
spop(args: any[], callback?: ResCallback): void;
|
||||
srandmember(args: any[], callback?: ResCallback): void;
|
||||
sinter(args: any[], callback?: ResCallback): void;
|
||||
sinterstore(args: any[], callback?: ResCallback): void;
|
||||
sunion(args: any[], callback?: ResCallback): void;
|
||||
sunionstore(args: any[], callback?: ResCallback): void;
|
||||
sdiff(args: any[], callback?: ResCallback): void;
|
||||
sdiffstore(args: any[], callback?: ResCallback): void;
|
||||
smembers(args: any[], callback?: ResCallback): void;
|
||||
zadd(args: any[], callback?: ResCallback): void;
|
||||
zincrby(args: any[], callback?: ResCallback): void;
|
||||
zrem(args: any[], callback?: ResCallback): void;
|
||||
zremrangebyscore(args: any[], callback?: ResCallback): void;
|
||||
zremrangebyrank(args: any[], callback?: ResCallback): void;
|
||||
zunionstore(args: any[], callback?: ResCallback): void;
|
||||
zinterstore(args: any[], callback?: ResCallback): void;
|
||||
zrange(args: any[], callback?: ResCallback): void;
|
||||
zrangebyscore(args: any[], callback?: ResCallback): void;
|
||||
zrevrangebyscore(args: any[], callback?: ResCallback): void;
|
||||
zcount(args: any[], callback?: ResCallback): void;
|
||||
zrevrange(args: any[], callback?: ResCallback): void;
|
||||
zcard(args: any[], callback?: ResCallback): void;
|
||||
zscore(args: any[], callback?: ResCallback): void;
|
||||
zrank(args: any[], callback?: ResCallback): void;
|
||||
zrevrank(args: any[], callback?: ResCallback): void;
|
||||
hset(args: any[], callback?: ResCallback): void;
|
||||
hsetnx(args: any[], callback?: ResCallback): void;
|
||||
hget(args: any[], callback?: ResCallback): void;
|
||||
hmset(args: any[], callback?: ResCallback): void;
|
||||
hmget(args: any[], callback?: ResCallback): void;
|
||||
hincrby(args: any[], callback?: ResCallback): void;
|
||||
hdel(args: any[], callback?: ResCallback): void;
|
||||
hlen(args: any[], callback?: ResCallback): void;
|
||||
hkeys(args: any[], callback?: ResCallback): void;
|
||||
hvals(args: any[], callback?: ResCallback): void;
|
||||
hgetall(args: any[], callback?: ResCallback): void;
|
||||
hexists(args: any[], callback?: ResCallback): void;
|
||||
incrby(args: any[], callback?: ResCallback): void;
|
||||
decrby(args: any[], callback?: ResCallback): void;
|
||||
getset(args: any[], callback?: ResCallback): void;
|
||||
mset(args: any[], callback?: ResCallback): void;
|
||||
msetnx(args: any[], callback?: ResCallback): void;
|
||||
randomkey(args: any[], callback?: ResCallback): void;
|
||||
select(args: any[], callback?: ResCallback): void;
|
||||
move(args: any[], callback?: ResCallback): void;
|
||||
rename(args: any[], callback?: ResCallback): void;
|
||||
renamenx(args: any[], callback?: ResCallback): void;
|
||||
expire(args: any[], callback?: ResCallback): void;
|
||||
expireat(args: any[], callback?: ResCallback): void;
|
||||
keys(args: any[], callback?: ResCallback): void;
|
||||
dbsize(args: any[], callback?: ResCallback): void;
|
||||
auth(args: any[], callback?: ResCallback): void;
|
||||
ping(args: any[], callback?: ResCallback): void;
|
||||
echo(args: any[], callback?: ResCallback): void;
|
||||
save(args: any[], callback?: ResCallback): void;
|
||||
bgsave(args: any[], callback?: ResCallback): void;
|
||||
bgrewriteaof(args: any[], callback?: ResCallback): void;
|
||||
shutdown(args: any[], callback?: ResCallback): void;
|
||||
lastsave(args: any[], callback?: ResCallback): void;
|
||||
type(args: any[], callback?: ResCallback): void;
|
||||
multi(args: any[], callback?: ResCallback): void;
|
||||
exec(args: any[], callback?: ResCallback): void;
|
||||
discard(args: any[], callback?: ResCallback): void;
|
||||
sync(args: any[], callback?: ResCallback): void;
|
||||
flushdb(args: any[], callback?: ResCallback): void;
|
||||
flushall(args: any[], callback?: ResCallback): void;
|
||||
sort(args: any[], callback?: ResCallback): void;
|
||||
info(args: any[], callback?: ResCallback): void;
|
||||
monitor(args: any[], callback?: ResCallback): void;
|
||||
ttl(args: any[], callback?: ResCallback): void;
|
||||
persist(args: any[], callback?: ResCallback): void;
|
||||
slaveof(args: any[], callback?: ResCallback): void;
|
||||
debug(args: any[], callback?: ResCallback): void;
|
||||
config(args: any[], callback?: ResCallback): void;
|
||||
subscribe(args: any[], callback?: ResCallback): void;
|
||||
unsubscribe(args: any[], callback?: ResCallback): void;
|
||||
psubscribe(args: any[], callback?: ResCallback): void;
|
||||
punsubscribe(args: any[], callback?: ResCallback): void;
|
||||
publish(args: any[], callback?: ResCallback): void;
|
||||
watch(args: any[], callback?: ResCallback): void;
|
||||
unwatch(args: any[], callback?: ResCallback): void;
|
||||
cluster(args: any[], callback?: ResCallback): void;
|
||||
restore(args: any[], callback?: ResCallback): void;
|
||||
migrate(args: any[], callback?: ResCallback): void;
|
||||
dump(args: any[], callback?: ResCallback): void;
|
||||
object(args: any[], callback?: ResCallback): void;
|
||||
client(args: any[], callback?: ResCallback): void;
|
||||
eval(args: any[], callback?: ResCallback): void;
|
||||
evalsha(args: any[], callback?: ResCallback): void;
|
||||
}
|
||||
}
|
||||
198
request/request-tests.ts
Normal file
198
request/request-tests.ts
Normal file
@@ -0,0 +1,198 @@
|
||||
/// <reference path="request.d.ts" />
|
||||
|
||||
import request = require('request');
|
||||
import http = require('http');
|
||||
import stream = require('stream');
|
||||
import formData = require('form-data');
|
||||
|
||||
var value: any;
|
||||
var str: string;
|
||||
var buffer: NodeBuffer;
|
||||
var num: number;
|
||||
var bool: boolean;
|
||||
var date: Date;
|
||||
var obj: Object;
|
||||
var dest: string;
|
||||
|
||||
var uri: string;
|
||||
var headers: {[key: string]: string};
|
||||
|
||||
var agent: http.Agent;
|
||||
var write: stream.Writable;
|
||||
var req: request.Request;
|
||||
var form: formData.FormData;
|
||||
|
||||
var bodyArr: request.RequestPart[] = [{
|
||||
body: value
|
||||
}, {
|
||||
body: value
|
||||
}, {
|
||||
body: value
|
||||
}];
|
||||
|
||||
// --- --- --- --- --- --- --- --- --- --- --- ---
|
||||
|
||||
str = req.toJSON();
|
||||
|
||||
var cookieValue: request.CookieValue;
|
||||
str = cookieValue.name;
|
||||
value = cookieValue.value;
|
||||
bool = cookieValue.httpOnly;
|
||||
|
||||
var cookie: request.Cookie;
|
||||
str = cookie.str;
|
||||
date = cookie.expires;
|
||||
str = cookie.path;
|
||||
str = cookie.toString();
|
||||
|
||||
var jar: request.CookieJar;
|
||||
jar.add(cookie);
|
||||
cookie = jar.get(req);
|
||||
str = jar.cookieString(req);
|
||||
|
||||
var aws: request.AWSOptions;
|
||||
str = aws.secret;
|
||||
str = aws.bucket;
|
||||
|
||||
var oauth: request.OAuthOptions;
|
||||
str = oauth.callback;
|
||||
str = oauth.consumer_key;
|
||||
str = oauth.consumer_secret;
|
||||
str = oauth.token;
|
||||
str = oauth.token_secret;
|
||||
str = oauth.verifier;
|
||||
|
||||
var options: request.Options = {
|
||||
url: str,
|
||||
uri: str,
|
||||
callback: (error: any, response: any, body: any) => {
|
||||
|
||||
},
|
||||
jar: value,
|
||||
form: value,
|
||||
oauth: value,
|
||||
aws: aws,
|
||||
qs: obj,
|
||||
json: value,
|
||||
multipart: value,
|
||||
agentOptions: value,
|
||||
agentClass: value,
|
||||
forever: value,
|
||||
host: str,
|
||||
port: num,
|
||||
method: str,
|
||||
headers: value,
|
||||
body: value,
|
||||
followRedirect: bool,
|
||||
followAllRedirects: bool,
|
||||
maxRedirects: num,
|
||||
encoding: str,
|
||||
pool: value,
|
||||
timeout: num,
|
||||
proxy: value,
|
||||
strictSSL: bool
|
||||
};
|
||||
|
||||
// --- --- --- --- --- --- --- --- --- --- --- ---
|
||||
|
||||
agent = req.getAgent();
|
||||
//req.start();
|
||||
//req.abort();
|
||||
req.pipeDest(dest);
|
||||
req = req.setHeader(str, str);
|
||||
req = req.setHeader(str, str, bool);
|
||||
req = req.setHeaders(headers);
|
||||
req = req.qs(obj);
|
||||
req = req.qs(obj, bool);
|
||||
req = req.form(obj);
|
||||
form = req.form();
|
||||
req = req.multipart(bodyArr);
|
||||
req = req.json(value);
|
||||
req = req.aws(aws);
|
||||
req = req.aws(aws, bool);
|
||||
req = req.oauth(oauth);
|
||||
req = req.jar(jar);
|
||||
write = req.pipe(write);
|
||||
write = req.pipe(write, value);
|
||||
req.write();
|
||||
req.end(str);
|
||||
req.end(buffer);
|
||||
req.pause();
|
||||
req.resume();
|
||||
req.abort();
|
||||
req.destroy();
|
||||
|
||||
// --- --- --- --- --- --- --- --- --- --- --- ---
|
||||
|
||||
var callback: (error: any, response: any, body: any) => void;
|
||||
|
||||
value = request.initParams;
|
||||
|
||||
req = request(uri);
|
||||
req = request(uri, options);
|
||||
req = request(uri, options, callback);
|
||||
req = request(uri, callback);
|
||||
req = request(options);
|
||||
req = request(options, callback);
|
||||
|
||||
req = request.request(uri);
|
||||
req = request.request(uri, options);
|
||||
req = request.request(uri, options, callback);
|
||||
req = request.request(uri, callback);
|
||||
req = request.request(options);
|
||||
req = request.request(options, callback);
|
||||
|
||||
req = request.get(uri);
|
||||
req = request.get(uri, options);
|
||||
req = request.get(uri, options, callback);
|
||||
req = request.get(uri, callback);
|
||||
req = request.get(options);
|
||||
req = request.get(options, callback);
|
||||
|
||||
req = request.post(uri);
|
||||
req = request.post(uri, options);
|
||||
req = request.post(uri, options, callback);
|
||||
req = request.post(uri, callback);
|
||||
req = request.post(options);
|
||||
req = request.post(options, callback);
|
||||
|
||||
req = request.put(uri);
|
||||
req = request.put(uri, options);
|
||||
req = request.put(uri, options, callback);
|
||||
req = request.put(uri, callback);
|
||||
req = request.put(options);
|
||||
req = request.put(options, callback);
|
||||
|
||||
req = request.head(uri);
|
||||
req = request.head(uri, options);
|
||||
req = request.head(uri, options, callback);
|
||||
req = request.head(uri, callback);
|
||||
req = request.head(options);
|
||||
req = request.head(options, callback);
|
||||
|
||||
req = request.patch(uri);
|
||||
req = request.patch(uri, options);
|
||||
req = request.patch(uri, options, callback);
|
||||
req = request.patch(uri, callback);
|
||||
req = request.patch(options);
|
||||
req = request.patch(options, callback);
|
||||
|
||||
req = request.del(uri);
|
||||
req = request.del(uri, options);
|
||||
req = request.del(uri, options, callback);
|
||||
req = request.del(uri, callback);
|
||||
req = request.del(options);
|
||||
req = request.del(options, callback);
|
||||
|
||||
req = request.forever(value, value);
|
||||
jar = request.jar();
|
||||
cookie = request.cookie(str);
|
||||
|
||||
var r = request.defaults(options);
|
||||
r(str);
|
||||
r.get(str);
|
||||
r.post(str);
|
||||
|
||||
r(options);
|
||||
r.get(options);
|
||||
r.post(options);
|
||||
171
request/request.d.ts
vendored
Normal file
171
request/request.d.ts
vendored
Normal file
@@ -0,0 +1,171 @@
|
||||
// Type definitions for request
|
||||
// Project: https://github.com/mikeal/request
|
||||
// Definitions by: Carlos Ballesteros Velasco <https://github.com/soywiz>, bonnici <https://github.com/bonnici>, Bart van der Schoor <https://github.com/Bartvds>
|
||||
// Definitions: https://github.com/borisyankov/DefinitelyTyped
|
||||
|
||||
// Imported from: https://github.com/soywiz/typescript-node-definitions/d.ts
|
||||
|
||||
/// <reference path="../node/node.d.ts" />
|
||||
/// <reference path="../form-data/form-data.d.ts" />
|
||||
|
||||
declare module 'request' {
|
||||
import stream = require('stream');
|
||||
import http = require('http');
|
||||
import FormData = require('form-data');
|
||||
|
||||
export = RequestAPI;
|
||||
|
||||
function RequestAPI(uri: string, options?: RequestAPI.Options, callback?: (error: any, response: any, body: any) => void): RequestAPI.Request;
|
||||
function RequestAPI(uri: string, callback?: (error: any, response: any, body: any) => void): RequestAPI.Request;
|
||||
function RequestAPI(options: RequestAPI.Options, callback?: (error: any, response: any, body: any) => void): RequestAPI.Request;
|
||||
|
||||
module RequestAPI {
|
||||
export function defaults(options: Options): typeof RequestAPI;
|
||||
|
||||
export function request(uri: string, options?: Options, callback?: (error: any, response: any, body: any) => void): Request;
|
||||
export function request(uri: string, callback?: (error: any, response: any, body: any) => void): Request;
|
||||
export function request(options?: Options, callback?: (error: any, response: any, body: any) => void): Request;
|
||||
|
||||
export function get(uri: string, options?: Options, callback?: (error: any, response: any, body: any) => void): Request;
|
||||
export function get(uri: string, callback?: (error: any, response: any, body: any) => void): Request;
|
||||
export function get(options: Options, callback?: (error: any, response: any, body: any) => void): Request;
|
||||
|
||||
export function post(uri: string, options?: Options, callback?: (error: any, response: any, body: any) => void): Request;
|
||||
export function post(uri: string, callback?: (error: any, response: any, body: any) => void): Request;
|
||||
export function post(options: Options, callback?: (error: any, response: any, body: any) => void): Request;
|
||||
|
||||
export function put(uri: string, options?: Options, callback?: (error: any, response: any, body: any) => void): Request;
|
||||
export function put(uri: string, callback?: (error: any, response: any, body: any) => void): Request;
|
||||
export function put(options: Options, callback?: (error: any, response: any, body: any) => void): Request;
|
||||
|
||||
export function head(uri: string, options?: Options, callback?: (error: any, response: any, body: any) => void): Request;
|
||||
export function head(uri: string, callback?: (error: any, response: any, body: any) => void): Request;
|
||||
export function head(options: Options, callback?: (error: any, response: any, body: any) => void): Request;
|
||||
|
||||
export function patch(uri: string, options?: Options, callback?: (error: any, response: any, body: any) => void): Request;
|
||||
export function patch(uri: string, callback?: (error: any, response: any, body: any) => void): Request;
|
||||
export function patch(options: Options, callback?: (error: any, response: any, body: any) => void): Request;
|
||||
|
||||
export function del(uri: string, options?: Options, callback?: (error: any, response: any, body: any) => void): Request;
|
||||
export function del(uri: string, callback?: (error: any, response: any, body: any) => void): Request;
|
||||
export function del(options: Options, callback?: (error: any, response: any, body: any) => void): Request;
|
||||
|
||||
export function forever(agentOptions: any, optionsArg: any): Request;
|
||||
export function jar(): CookieJar;
|
||||
export function cookie(str: string): Cookie;
|
||||
|
||||
export var initParams: any;
|
||||
|
||||
export interface Options {
|
||||
url?: string;
|
||||
uri?: string;
|
||||
callback?: (error: any, response: any, body: any) => void;
|
||||
jar?: any; // CookieJar
|
||||
form?: FormData;
|
||||
oauth?: OAuthOptions;
|
||||
aws?: AWSOptions;
|
||||
hawk ?: HawkOptions;
|
||||
qs?: Object;
|
||||
json?: any;
|
||||
multipart?: RequestPart[];
|
||||
agentOptions?: any;
|
||||
agentClass?: any;
|
||||
forever?: any;
|
||||
host?: string;
|
||||
port?: number;
|
||||
method?: string;
|
||||
headers?: Headers;
|
||||
body?: any;
|
||||
followRedirect?: boolean;
|
||||
followAllRedirects?: boolean;
|
||||
maxRedirects?: number;
|
||||
encoding?: string;
|
||||
pool?: any;
|
||||
timeout?: number;
|
||||
proxy?: any;
|
||||
strictSSL?: boolean;
|
||||
}
|
||||
|
||||
export interface RequestPart {
|
||||
headers?: Headers;
|
||||
body: any;
|
||||
}
|
||||
|
||||
export interface Request {
|
||||
getAgent(): http.Agent;
|
||||
//start(): void;
|
||||
//abort(): void;
|
||||
pipeDest(dest: any): void;
|
||||
setHeader(name: string, value: string, clobber?: boolean): Request;
|
||||
setHeaders(headers: Headers): Request;
|
||||
qs(q: Object, clobber?: boolean): Request;
|
||||
form(): FormData.FormData;
|
||||
form(form: any): Request;
|
||||
multipart(multipart: RequestPart[]): Request;
|
||||
json(val: any): Request;
|
||||
aws(opts: AWSOptions, now?: boolean): Request;
|
||||
oauth(oauth: OAuthOptions): Request;
|
||||
jar(jar: CookieJar): Request;
|
||||
|
||||
pipe(dest: stream.Writable, opts?: any): stream.Writable;
|
||||
write(): void;
|
||||
end(chunk: string): void;
|
||||
end(chunk: NodeBuffer): void;
|
||||
pause(): void;
|
||||
resume(): void;
|
||||
abort(): void;
|
||||
destroy(): void;
|
||||
toJSON(): string;
|
||||
}
|
||||
|
||||
export interface Headers {
|
||||
[key: string]: any;
|
||||
}
|
||||
|
||||
export interface AuthOptions {
|
||||
user?: string;
|
||||
username?: string;
|
||||
pass?: string;
|
||||
password?: string;
|
||||
sendImmediately?: boolean;
|
||||
}
|
||||
|
||||
export interface OAuthOptions {
|
||||
callback?: string;
|
||||
consumer_key?: string;
|
||||
consumer_secret?: string;
|
||||
token?: string;
|
||||
token_secret?: string;
|
||||
verifier?: string;
|
||||
}
|
||||
|
||||
export interface HawkOptions {
|
||||
credentials: any;
|
||||
}
|
||||
|
||||
export interface AWSOptions {
|
||||
secret: string;
|
||||
bucket?: string;
|
||||
}
|
||||
|
||||
export interface CookieJar {
|
||||
add(cookie: Cookie): void;
|
||||
get(req: Request): Cookie;
|
||||
cookieString(req: Request): string;
|
||||
}
|
||||
|
||||
export interface CookieValue {
|
||||
name: string;
|
||||
value: any;
|
||||
httpOnly: boolean;
|
||||
}
|
||||
|
||||
export interface Cookie extends Array<CookieValue> {
|
||||
constructor(name: string, req: Request): void;
|
||||
str: string;
|
||||
expires: Date;
|
||||
path: string;
|
||||
toString(): string;
|
||||
}
|
||||
}
|
||||
}
|
||||
11
rimraf/rimraf-tests.ts
Normal file
11
rimraf/rimraf-tests.ts
Normal file
@@ -0,0 +1,11 @@
|
||||
/// <reference path="rimraf.d.ts" />
|
||||
|
||||
import rimraf = require('rimraf');
|
||||
|
||||
rimraf('./xyz', (err: Error) => {
|
||||
|
||||
});
|
||||
rimraf.sync('./xyz');
|
||||
|
||||
rimraf.EMFILE_MAX = 0;
|
||||
rimraf.BUSYTRIES_MAX = 0;
|
||||
16
rimraf/rimraf.d.ts
vendored
Normal file
16
rimraf/rimraf.d.ts
vendored
Normal file
@@ -0,0 +1,16 @@
|
||||
// Type definitions for rimraf
|
||||
// Project: https://github.com/isaacs/rimraf
|
||||
// Definitions by: Carlos Ballesteros Velasco <https://github.com/soywiz>
|
||||
// Definitions: https://github.com/borisyankov/DefinitelyTyped
|
||||
|
||||
// Imported from: https://github.com/soywiz/typescript-node-definitions/rimraf.d.ts
|
||||
|
||||
declare module "rimraf" {
|
||||
function rimraf(path: string, callback: (error: Error) => void): void;
|
||||
module rimraf {
|
||||
export function sync(path: string): void;
|
||||
export var EMFILE_MAX: number;
|
||||
export var BUSYTRIES_MAX: number;
|
||||
}
|
||||
export = rimraf;
|
||||
}
|
||||
14
sprintf/sprintf-tests.ts
Normal file
14
sprintf/sprintf-tests.ts
Normal file
@@ -0,0 +1,14 @@
|
||||
/// <reference path="sprintf.d.ts" />
|
||||
|
||||
import sprintf = require('sprintf');
|
||||
|
||||
var str: string;
|
||||
var num: number;
|
||||
|
||||
sprintf.sprintf(str, str);
|
||||
sprintf.sprintf(str, str, num);
|
||||
sprintf.sprintf(str, num, str);
|
||||
|
||||
sprintf.vsprintf(str, [str]);
|
||||
sprintf.vsprintf(str, [str, num]);
|
||||
sprintf.vsprintf(str, [num, str]);
|
||||
11
sprintf/sprintf.d.ts
vendored
Normal file
11
sprintf/sprintf.d.ts
vendored
Normal file
@@ -0,0 +1,11 @@
|
||||
// Type definitions for sprintff
|
||||
// Project: https://github.com/maritz/node-sprintff
|
||||
// Definitions by: Carlos Ballesteros Velasco <https://github.com/soywiz>
|
||||
// Definitions: https://github.com/borisyankov/DefinitelyTyped
|
||||
|
||||
// Imported from: https://github.com/soywiz/typescript-node-definitions/sprintff.d.ts
|
||||
|
||||
declare module "sprintf" {
|
||||
export function sprintf(fmt: string, ...args: any[]): string;
|
||||
export function vsprintf(fmt: string, args: any[]): string;
|
||||
}
|
||||
25
swig/swig-tests.ts
Normal file
25
swig/swig-tests.ts
Normal file
@@ -0,0 +1,25 @@
|
||||
/// <reference path="swig.d.ts" />
|
||||
|
||||
import swig = require('swig');
|
||||
|
||||
var value: any;
|
||||
var str: string;
|
||||
var num: number;
|
||||
var bool: boolean;
|
||||
|
||||
var opts: swig.Options = {
|
||||
allowErrors: bool,
|
||||
autoescape: bool,
|
||||
cache: bool,
|
||||
encoding: str,
|
||||
filters: value,
|
||||
root: str,
|
||||
tags: value,
|
||||
extensions: value,
|
||||
tzOffset: num
|
||||
};
|
||||
|
||||
swig.init(opts);
|
||||
value = swig.compileFile(str);
|
||||
value = swig.compile(str);
|
||||
value = swig.compile(str, opts);
|
||||
24
swig/swig.d.ts
vendored
Normal file
24
swig/swig.d.ts
vendored
Normal file
@@ -0,0 +1,24 @@
|
||||
// Type definitions for swig
|
||||
// Project: http://github.com/paularmstrong/swig
|
||||
// Definitions by: Carlos Ballesteros Velasco <https://github.com/soywiz>
|
||||
// Definitions: https://github.com/borisyankov/DefinitelyTyped
|
||||
|
||||
// Imported from: https://github.com/soywiz/typescript-node-definitions/swig.d.ts
|
||||
|
||||
declare module "swig" {
|
||||
export function init(options: Options): void;
|
||||
export function compileFile(filepath: string): any;
|
||||
export function compile(source: string, options?: Options): any;
|
||||
|
||||
export interface Options {
|
||||
allowErrors?: boolean;
|
||||
autoescape?: boolean;
|
||||
cache?: boolean;
|
||||
encoding?: string;
|
||||
filters?: any;
|
||||
root?: string;
|
||||
tags?: any;
|
||||
extensions?: any;
|
||||
tzOffset?: number;
|
||||
}
|
||||
}
|
||||
172
swiz/swiz-tests.ts
Normal file
172
swiz/swiz-tests.ts
Normal file
@@ -0,0 +1,172 @@
|
||||
/// <reference path="swiz.d.ts" />
|
||||
|
||||
import swiz = require('swiz');
|
||||
|
||||
var chain: swiz.IChain;
|
||||
var sw: swiz.Swiz;
|
||||
var value: any;
|
||||
var valueArr: any[];
|
||||
var str: string;
|
||||
var strArr: string[];
|
||||
var exp: RegExp;
|
||||
var num: number;
|
||||
var bool: boolean;
|
||||
var callback: Function;
|
||||
|
||||
var defs: swiz.struct.IObj[];
|
||||
var opts: swiz.ISwizOptions;
|
||||
var field: swiz.struct.IField;
|
||||
var ser: swiz.ISerializable;
|
||||
var fieldArr: swiz.struct.IField[];
|
||||
|
||||
var opts: swiz.ISwizOptions = {
|
||||
stripNulls: bool,
|
||||
stripSerializerType: bool,
|
||||
for: str
|
||||
};
|
||||
|
||||
var obj: swiz.struct.IObj = {
|
||||
name: str,
|
||||
options: objOpts,
|
||||
singular: str,
|
||||
plural: str,
|
||||
fields: fieldArr
|
||||
};
|
||||
|
||||
var field: swiz.struct.IField = {
|
||||
name: str,
|
||||
options: fieldOpts,
|
||||
src: str,
|
||||
singular: str,
|
||||
plural: str,
|
||||
desc: str,
|
||||
val: chain,
|
||||
attribute: bool,
|
||||
enumerated: bool,
|
||||
ignorePublic: bool,
|
||||
filterFrom: strArr,
|
||||
coerceTo: value
|
||||
};
|
||||
|
||||
var objOpts: swiz.struct.IObjOptions = {
|
||||
singular: str,
|
||||
plural: str,
|
||||
fields: fieldArr
|
||||
};
|
||||
|
||||
var fieldOpts: swiz.struct.IFieldOptions = {
|
||||
src: str,
|
||||
singular: str,
|
||||
plural: str,
|
||||
desc: str,
|
||||
val: chain,
|
||||
attribute: bool,
|
||||
enumerated: value,
|
||||
ignorePublic: bool,
|
||||
filterFrom: strArr,
|
||||
coerceTo: str
|
||||
};
|
||||
|
||||
var valid: swiz.IValidator;
|
||||
str = valid.name;
|
||||
valid.func(value, value, callback);
|
||||
str = valid.help;
|
||||
|
||||
sw = new swiz.Swiz(defs, opts);
|
||||
sw.buildObject(value, (err: any, result: any) => {
|
||||
|
||||
});
|
||||
value = sw.buildObjectSync(value);
|
||||
str = sw.serializeJson(value);
|
||||
str = sw.serializeXml(value);
|
||||
value = sw.deserializeXml(str);
|
||||
sw.serialize(swiz.SERIALIZATION.SERIALIZATION_JSON, num, ser, (err: any, str: string) => {
|
||||
|
||||
});
|
||||
sw.serializeForPagination(swiz.SERIALIZATION.SERIALIZATION_JSON, valueArr, value, (err: any, str: string) => {
|
||||
|
||||
});
|
||||
sw.deserialize(swiz.SERIALIZATION.SERIALIZATION_JSON, num, str, (err: any, result: any) => {
|
||||
|
||||
});
|
||||
field = sw.getFieldDefinition(str, str);
|
||||
|
||||
// some of the chain API
|
||||
chain = swiz.chain();
|
||||
|
||||
num = chain.getValidatorPos(str);
|
||||
num = chain.hasValidator(str);
|
||||
|
||||
valid = chain.getValidatorAtPos(num);
|
||||
chain = chain.isUnique();
|
||||
chain = chain.toUnique();
|
||||
chain = chain.notIPBlacklisted();
|
||||
chain = chain.isCIDR();
|
||||
chain = chain.isEmail();
|
||||
chain = chain.isUrl();
|
||||
chain = chain.isAddressPair();
|
||||
chain = chain.isIP();
|
||||
chain = chain.isIPv4();
|
||||
chain = chain.isIPv6();
|
||||
chain = chain.isHostnameOrIp();
|
||||
chain = chain.isAllowedFQDNOrIP();
|
||||
chain = chain.isAllowedFQDNOrIP(strArr);
|
||||
chain = chain.isHostname();
|
||||
chain = chain.isAlpha();
|
||||
chain = chain.isAlphanumeric();
|
||||
chain = chain.isNumeric();
|
||||
chain = chain.isInt();
|
||||
chain = chain.isLowercase();
|
||||
chain = chain.isUppercase();
|
||||
chain = chain.isDecimal();
|
||||
chain = chain.isFloat();
|
||||
chain = chain.notNull();
|
||||
chain = chain.isNull();
|
||||
chain = chain.notEmpty();
|
||||
chain = chain.equals(value);
|
||||
chain = chain.contains(value);
|
||||
chain = chain.notContains(value);
|
||||
chain = chain.notIn(valueArr);
|
||||
chain = chain.notIn(valueArr, bool);
|
||||
chain = chain.regex(exp);
|
||||
chain = chain.regex(str);
|
||||
chain = chain.regex(str, str);
|
||||
chain = chain.is(str);
|
||||
chain = chain.is(str, str);
|
||||
chain = chain.notRegex(exp);
|
||||
chain = chain.notRegex(str);
|
||||
chain = chain.notRegex(str, str);
|
||||
chain = chain.not(str, str);
|
||||
chain = chain.len(num);
|
||||
chain = chain.len(num, num);
|
||||
chain = chain.numItems(num, num);
|
||||
chain = chain.toFloat();
|
||||
chain = chain.toInt();
|
||||
chain = chain.toBoolean();
|
||||
chain = chain.toBooleanStrict();
|
||||
chain = chain.entityDecode();
|
||||
chain = chain.entityEncode();
|
||||
chain = chain.trim();
|
||||
chain = chain.trim(str);
|
||||
chain = chain.trim();
|
||||
chain = chain.trim(str);
|
||||
chain = chain.ltrim();
|
||||
chain = chain.ltrim(str);
|
||||
chain = chain.rtrim(str);
|
||||
chain = chain.ifNull(str);
|
||||
chain = chain.xss();
|
||||
chain = chain.xss(bool);
|
||||
chain = chain.enumerated(value);
|
||||
chain = chain.inArray(valueArr);
|
||||
chain = chain.isString();
|
||||
chain = chain.isBoolean();
|
||||
chain = chain.range(value, value);
|
||||
chain = chain.optional();
|
||||
chain = chain.isPort();
|
||||
chain = chain.isV1UUID();
|
||||
chain = chain.immutable();
|
||||
chain = chain.updateRequired();
|
||||
chain = chain.isArray(chain);
|
||||
chain = chain.isHash(chain, chain);
|
||||
chain = chain.rename(str);
|
||||
chain = chain.custom(str);
|
||||
195
swiz/swiz.d.ts
vendored
Normal file
195
swiz/swiz.d.ts
vendored
Normal file
@@ -0,0 +1,195 @@
|
||||
// Type definitions for swiz
|
||||
// Project: https://github.com/racker/node-swiz
|
||||
// Definitions by: Jeff Goddard <https://github.com/jedigo>
|
||||
// Definitions: https://github.com/borisyankov/DefinitelyTyped
|
||||
|
||||
// Imported from: https://github.com/soywiz/typescript-node-definitions/swiz.d.ts
|
||||
|
||||
declare module "swiz" {
|
||||
export class Cidr {
|
||||
constructor(x: string, y?: string);
|
||||
isInCIDR(x: any): boolean;
|
||||
}
|
||||
|
||||
export class Valve {
|
||||
constructor(schema: IValveSchema, baton?: any);
|
||||
setSchema(schema: IValveSchema): Valve;
|
||||
addFinalValidator(func: (obj: any, callback: (err: Error, cleaned: any) => void) => void): Valve;
|
||||
addChainValidator(name: string, description: string, func: (value: any, callback: (err: Error, cleaned: any) => void) => void): void;
|
||||
check(obj: any, options: ICheckOptions, callback: (err: any, cleaned: any) => void): void;
|
||||
check(obj: any, callback: (err: any, cleaned: any) => void): void;
|
||||
checkUpdate(existing: any, obj: any, callback: (err: any, cleaned: any) => void): void;
|
||||
help(schema: IValveSchema): any;
|
||||
}
|
||||
|
||||
export interface ICheckOptions {
|
||||
strict?: boolean;
|
||||
}
|
||||
|
||||
export interface IValveSchema {
|
||||
[index: string]: IValveSchemaMember;
|
||||
}
|
||||
|
||||
export interface IValveSchemaMember {}
|
||||
|
||||
export interface IValveSchemaMemberArray extends IValveSchemaMember {
|
||||
[index: string]: IValveSchemaMember;
|
||||
}
|
||||
|
||||
export function Chain(): IChain;
|
||||
|
||||
export function chain(): IChain;
|
||||
|
||||
export interface IChain extends IValveSchemaMember {
|
||||
getValidatorPos(name: string): number;
|
||||
hasValidator(name: string): number;
|
||||
getValidatorAtPos(pos: number): IValidator;
|
||||
isUnique(): IChain;
|
||||
toUnique(): IChain;
|
||||
notIPBlacklisted(): IChain;
|
||||
isCIDR(): IChain;
|
||||
isEmail(): IChain;
|
||||
isUrl(): IChain;
|
||||
isAddressPair(): IChain;
|
||||
isIP(): IChain;
|
||||
isIPv4(): IChain;
|
||||
isIPv6(): IChain;
|
||||
isHostnameOrIp(): IChain;
|
||||
isAllowedFQDNOrIP(blacklist?: string[]): IChain;
|
||||
isHostname(): IChain;
|
||||
isAlpha(): IChain;
|
||||
isAlphanumeric(): IChain;
|
||||
isNumeric(): IChain;
|
||||
isInt(): IChain;
|
||||
isLowercase(): IChain;
|
||||
isUppercase(): IChain;
|
||||
isDecimal(): IChain;
|
||||
isFloat(): IChain;
|
||||
notNull(): IChain;
|
||||
isNull(): IChain;
|
||||
notEmpty(): IChain;
|
||||
equals(arg: any): IChain;
|
||||
contains(arg: any): IChain;
|
||||
notContains(arg: any): IChain;
|
||||
notIn(values: any[], caseSensitive?: boolean): IChain;
|
||||
regex(pattern: RegExp): IChain;
|
||||
regex(pattern: string, modifiers?: string): IChain;
|
||||
is(pattern: string, modifiers?: string): IChain;
|
||||
notRegex(pattern: RegExp): IChain;
|
||||
notRegex(pattern: string, modifiers?: string): IChain;
|
||||
not(pattern: string, modifiers: string): IChain;
|
||||
len(min: number, max?: number): IChain;
|
||||
numItems(min: number, max: number): IChain;
|
||||
toFloat(): IChain;
|
||||
toInt(): IChain;
|
||||
toBoolean(): IChain;
|
||||
toBooleanStrict(): IChain;
|
||||
entityDecode(): IChain;
|
||||
entityEncode(): IChain;
|
||||
trim(chars?: string): IChain;
|
||||
ltrim(chars?: string): IChain;
|
||||
rtrim(chars: string): IChain;
|
||||
ifNull(replace: string): IChain;
|
||||
xss(is_image?: boolean): IChain;
|
||||
enumerated(map: any): IChain;
|
||||
inArray(array: any[]): IChain;
|
||||
isString(): IChain;
|
||||
isBoolean(): IChain;
|
||||
range(min: any, max: any): IChain;
|
||||
optional(): IChain;
|
||||
isPort(): IChain;
|
||||
isV1UUID(): IChain;
|
||||
immutable(): IChain;
|
||||
updateRequired(): IChain;
|
||||
isArray(chain: IChain): IChain;
|
||||
isHash(keyChain: IChain, valueChain: IChain): IChain;
|
||||
rename(target: string): IChain;
|
||||
custom(name: string): IChain;
|
||||
}
|
||||
|
||||
export function defToValve(def: struct.IObj[]): IValveSchema[];
|
||||
|
||||
export class Swiz {
|
||||
constructor(defs: struct.IObj[], options?: ISwizOptions);
|
||||
buildObject(obj: any, callback: (err: any, result: any) => void): void;
|
||||
buildObjectSync(obj: any): any;
|
||||
serializeJson(obj: any): string;
|
||||
serializeXml(obj: any): string;
|
||||
deserializeXml(xml: string): any;
|
||||
serialize(mode: SERIALIZATION, version: number, obj: ISerializable, callback: (err: any, result: string) => void): void;
|
||||
serializeForPagination(mode: SERIALIZATION, array: any[], metadata: any, callback: (err: any, result: string) => void): void;
|
||||
deserialize(mode: SERIALIZATION, version: number, raw: string, callback: (err: any, result: any) => void): void;
|
||||
getFieldDefinition(stype: string, name: string): struct.IField;
|
||||
}
|
||||
|
||||
export interface ISerializable {
|
||||
getSerializerType(): string;
|
||||
}
|
||||
|
||||
export interface ISwizOptions {
|
||||
stripNulls?: boolean;
|
||||
stripSerializerType?: boolean;
|
||||
for?: string;
|
||||
}
|
||||
|
||||
interface IValidator {
|
||||
name: string;
|
||||
func(value: any, baton: any, callback: Function): void;
|
||||
help: string;
|
||||
}
|
||||
|
||||
export function stripSerializerTypes(obj: any): any;
|
||||
|
||||
export module struct {
|
||||
export function Obj(name: string, options?: IObjOptions): IObj;
|
||||
export function Field(name: string, options?: IFieldOptions): IField;
|
||||
export function coerce(value: any, coerceTo: string): any;
|
||||
|
||||
export interface IObj {
|
||||
name: string;
|
||||
options: IObjOptions;
|
||||
singular: string;
|
||||
plural: string;
|
||||
fields: IField[];
|
||||
}
|
||||
|
||||
export interface IField {
|
||||
name: string;
|
||||
options: IFieldOptions;
|
||||
src: string;
|
||||
singular: string;
|
||||
plural: string;
|
||||
desc?: string;
|
||||
val?: IChain;
|
||||
attribute: boolean;
|
||||
enumerated: boolean;
|
||||
ignorePublic: boolean;
|
||||
filterFrom: string[];
|
||||
coerceTo: any;
|
||||
}
|
||||
|
||||
export interface IObjOptions {
|
||||
singular?: string;
|
||||
plural?: string;
|
||||
fields?: IField[];
|
||||
}
|
||||
|
||||
export interface IFieldOptions {
|
||||
src?: string;
|
||||
singular?: string;
|
||||
plural?: string;
|
||||
desc?: string;
|
||||
val?: IChain;
|
||||
attribute?: boolean;
|
||||
enumerated?: any;
|
||||
ignorePublic?: boolean;
|
||||
filterFrom?: string[];
|
||||
coerceTo?: string;
|
||||
}
|
||||
}
|
||||
|
||||
export enum SERIALIZATION {
|
||||
SERIALIZATION_JSON,
|
||||
SERIALIZATION_XML
|
||||
}
|
||||
}
|
||||
@@ -10550,7 +10550,6 @@ var container, stats;
|
||||
}
|
||||
|
||||
geometry.computeFaceNormals();
|
||||
geometry.computeCentroids();
|
||||
|
||||
group = new THREE.Object3D();
|
||||
group.scale.x = group.scale.y = group.scale.z = 2;
|
||||
@@ -16481,13 +16480,13 @@ function render() {
|
||||
var normalLength = 15;
|
||||
|
||||
var fl: number;
|
||||
var face: THREE.Face;
|
||||
var face: THREE.Face3;
|
||||
|
||||
for( f = 0, fl = geometry.faces.length; f < fl; f ++ ) {
|
||||
face = geometry.faces[ f ];
|
||||
var arrow = new THREE.ArrowHelper(
|
||||
face.normal,
|
||||
face.centroid,
|
||||
face.normal,
|
||||
normalLength,
|
||||
0x3333FF );
|
||||
mesh.add( arrow );
|
||||
@@ -17321,7 +17320,6 @@ function render() {
|
||||
// mergeVertices(); is run in case of duplicated vertices
|
||||
smooth.mergeVertices();
|
||||
|
||||
smooth.computeCentroids();
|
||||
smooth.computeFaceNormals();
|
||||
smooth.computeVertexNormals();
|
||||
|
||||
|
||||
544
threejs/three.d.ts
vendored
544
threejs/three.d.ts
vendored
File diff suppressed because it is too large
Load Diff
26
timezone-js/timezone-js-tests.ts
Normal file
26
timezone-js/timezone-js-tests.ts
Normal file
@@ -0,0 +1,26 @@
|
||||
/// <reference path="timezone-js.d.ts" />
|
||||
|
||||
import timezone = require('timezone-js');
|
||||
var tz = timezone.timezone;
|
||||
|
||||
var value: any;
|
||||
var str: string;
|
||||
var bool: boolean;
|
||||
|
||||
var opts: timezone.TimezoneJsOptions = {
|
||||
async: bool,
|
||||
success: (data: string) => {
|
||||
|
||||
},
|
||||
error: (err: Error) => {
|
||||
|
||||
},
|
||||
url: str
|
||||
};
|
||||
|
||||
str = tz.zoneFileBasePath;
|
||||
tz.loadingScheme;
|
||||
tz.loadingSchemes;
|
||||
|
||||
value = tz.transport(opts);
|
||||
value = tz.init(opts);
|
||||
45
timezone-js/timezone-js.d.ts
vendored
Normal file
45
timezone-js/timezone-js.d.ts
vendored
Normal file
@@ -0,0 +1,45 @@
|
||||
// Type definitions for timezone-js
|
||||
// Project: https://github.com/mde/timezone-js
|
||||
// Definitions by: bonnici <https://github.com/bonnici>
|
||||
// Definitions: https://github.com/borisyankov/DefinitelyTyped
|
||||
|
||||
// Imported from: https://github.com/soywiz/typescript-node-definitions/timezone-js.d.ts
|
||||
|
||||
declare module "timezone-js" {
|
||||
export var timezone: TimezoneJs;
|
||||
|
||||
export var Date: {
|
||||
new (timezone?: string): TimezoneJsDate;
|
||||
new (time: string, timezone?: string): TimezoneJsDate;
|
||||
new (year?: number, month?: number, day?: number, hour?: number, minute?: number, second?: string, timezone?: string): TimezoneJsDate;
|
||||
};
|
||||
|
||||
export interface TimezoneJsDate extends Date {
|
||||
setTimezone: (timezone: string) => void;
|
||||
}
|
||||
|
||||
export interface TimezoneJs {
|
||||
zoneFileBasePath: string;
|
||||
loadingScheme: TimezoneJsLoadingScheme;
|
||||
loadingSchemes: TimezoneJsLoadingSchemes;
|
||||
|
||||
transport(opts: TimezoneJsOptions): any;
|
||||
init(opts?: TimezoneJsOptions): any;
|
||||
}
|
||||
|
||||
export interface TimezoneJsOptions {
|
||||
async?: boolean;
|
||||
success?: (data: string) => void;
|
||||
error?: (err: Error) => void;
|
||||
url?: string;
|
||||
}
|
||||
|
||||
export interface TimezoneJsLoadingScheme {
|
||||
}
|
||||
|
||||
export enum TimezoneJsLoadingSchemes {
|
||||
PRELOAD_ALL,
|
||||
LAZY_LOAD,
|
||||
MANUAL_LOAD
|
||||
}
|
||||
}
|
||||
45
twig/twig-tests.ts
Normal file
45
twig/twig-tests.ts
Normal file
@@ -0,0 +1,45 @@
|
||||
/// <reference path="twig.d.ts" />
|
||||
|
||||
import twig = require('twig');
|
||||
|
||||
var value: any;
|
||||
var str: string;
|
||||
var num: number;
|
||||
var bool: boolean;
|
||||
|
||||
var params: twig.Parameters = {
|
||||
id: value,
|
||||
ref: value,
|
||||
href: value,
|
||||
path: value,
|
||||
debug: bool,
|
||||
trace: bool,
|
||||
strict_variables: bool,
|
||||
data: value
|
||||
};
|
||||
|
||||
var temp: twig.Template;
|
||||
var compOpts: twig.CompileOptions = {
|
||||
filename: str,
|
||||
settings: value
|
||||
};
|
||||
|
||||
var compiled:(context: any) => any;
|
||||
|
||||
temp = twig.twig(params);
|
||||
twig.extendFilter(str, (left: any, ...params: any[]) => {
|
||||
return str;
|
||||
});
|
||||
twig.extendFunction(str, (...params: any[]) => {
|
||||
return str;
|
||||
});
|
||||
twig.extendTest(str, (value: any) => bool);
|
||||
twig.extendTag(value);
|
||||
compiled = twig.compile(str, compOpts);
|
||||
twig.renderFile(str, compOpts, (err, result) => {
|
||||
|
||||
});
|
||||
twig.__express(str, compOpts, (err, result) => {
|
||||
|
||||
});
|
||||
twig.cache(bool);
|
||||
37
twig/twig.d.ts
vendored
Normal file
37
twig/twig.d.ts
vendored
Normal file
@@ -0,0 +1,37 @@
|
||||
// Type definitions for twig
|
||||
// Project: https://github.com/justjohn/twig.js
|
||||
// Definitions by: Carlos Ballesteros Velasco <https://github.com/soywiz>
|
||||
// Definitions: https://github.com/borisyankov/DefinitelyTyped
|
||||
|
||||
// Imported from: https://github.com/soywiz/typescript-node-definitions/twig.d.ts
|
||||
|
||||
declare module "twig" {
|
||||
export interface Parameters {
|
||||
id?: any;
|
||||
ref?: any;
|
||||
href?: any;
|
||||
path?: any;
|
||||
debug?: boolean;
|
||||
trace?: boolean;
|
||||
strict_variables?: boolean;
|
||||
data: any;
|
||||
}
|
||||
|
||||
export interface Template {
|
||||
}
|
||||
|
||||
export interface CompileOptions {
|
||||
filename: string;
|
||||
settings: any;
|
||||
}
|
||||
|
||||
export function twig(params: Parameters): Template;
|
||||
export function extendFilter(name: string, definition: (left: any, ...params: any[]) => string): void;
|
||||
export function extendFunction(name: string, definition: (...params: any[]) => string): void;
|
||||
export function extendTest(name: string, definition: (value: any) => boolean): void;
|
||||
export function extendTag(definition: any): void;
|
||||
export function compile(markup: string, options: CompileOptions): (context: any) => any;
|
||||
export function renderFile(path: string, options: CompileOptions, fn: (err: Error, result: any) => void): void;
|
||||
export function __express(path: string, options: CompileOptions, fn: (err: Error, result: any) => void): void;
|
||||
export function cache(value: boolean): void;
|
||||
}
|
||||
32
watch/watch-tests.ts
Normal file
32
watch/watch-tests.ts
Normal file
@@ -0,0 +1,32 @@
|
||||
/// <reference path="watch.d.ts" />
|
||||
|
||||
import watch = require('watch');
|
||||
import fs = require('fs');
|
||||
|
||||
var value: any;
|
||||
var str: string;
|
||||
var num: number;
|
||||
var bool: boolean;
|
||||
|
||||
var mon: watch.Monitor;
|
||||
var opts: watch.Options = {
|
||||
ignoreDotFiles: bool,
|
||||
filter: value
|
||||
};
|
||||
|
||||
mon.on('foo', () => {
|
||||
|
||||
});
|
||||
|
||||
watch.watchTree(str, (f: any, curr: fs.Stats, prev: fs.Stats) => {
|
||||
|
||||
});
|
||||
watch.watchTree(str, opts, (f: any, curr: fs.Stats, prev: fs.Stats) => {
|
||||
|
||||
});
|
||||
watch.createMonitor(str, (monitor: watch.Monitor) => {
|
||||
|
||||
});
|
||||
watch.createMonitor(str, opts, (monitor: watch.Monitor) => {
|
||||
|
||||
});
|
||||
35
watch/watch.d.ts
vendored
Normal file
35
watch/watch.d.ts
vendored
Normal file
@@ -0,0 +1,35 @@
|
||||
// Type definitions for watch
|
||||
// Project: https://github.com/mikeal/watch
|
||||
// Definitions by: Carlos Ballesteros Velasco <https://github.com/soywiz>
|
||||
// Definitions: https://github.com/borisyankov/DefinitelyTyped
|
||||
|
||||
// Imported from: https://github.com/soywiz/typescript-node-definitions/watch.d.ts
|
||||
|
||||
/// <reference path="../node/node.d.ts" />
|
||||
|
||||
declare module "watch" {
|
||||
import fs = require("fs");
|
||||
import events = require("events");
|
||||
|
||||
export interface Monitor extends events.EventEmitter {
|
||||
// event: created
|
||||
// event: removed
|
||||
// event: changed
|
||||
|
||||
// export function onCreated(callback, function(f, stat: fs.Stats) { });
|
||||
// export function onChanged(callback, function(f, curr: fs.Stats, prev: fs.Stats) { });
|
||||
// export function onRemoved(callback, function(f, stat: fs.Stats) { });
|
||||
}
|
||||
|
||||
export interface Options {
|
||||
persistent?: boolean;
|
||||
ignoreDotFiles?: boolean;
|
||||
filter?: any;
|
||||
interval?: number;
|
||||
}
|
||||
|
||||
export function watchTree(root: string, callback: (f: any, curr: fs.Stats, prev: fs.Stats) => void): void;
|
||||
export function watchTree(root: string, options: Options, callback: (f: any, curr: fs.Stats, prev: fs.Stats) => void): void;
|
||||
export function createMonitor(root: string, callback: (monitor: Monitor) => void): void;
|
||||
export function createMonitor(root: string, options: Options, callback: (monitor: Monitor) => void): void;
|
||||
}
|
||||
40
winston/winston-tests.ts
Normal file
40
winston/winston-tests.ts
Normal file
@@ -0,0 +1,40 @@
|
||||
/// <reference path="winston.d.ts" />
|
||||
|
||||
import winston = require('winston');
|
||||
|
||||
var str: string;
|
||||
var bool: boolean;
|
||||
var metadata: any;
|
||||
var options: any;
|
||||
var value: any;
|
||||
var transport: winston.Transport;
|
||||
|
||||
transport = winston.transports.File;
|
||||
transport = winston.transports.Console;
|
||||
transport = winston.transports.Loggly;
|
||||
|
||||
winston.log(str, str);
|
||||
winston.log(str, str, metadata);
|
||||
winston.debug(str);
|
||||
winston.debug(str, metadata);
|
||||
winston.info(str);
|
||||
winston.info(str, metadata);
|
||||
winston.warn(str);
|
||||
winston.warn(str, metadata);
|
||||
winston.error(str);
|
||||
winston.error(str, metadata);
|
||||
|
||||
winston.add(transport, options);
|
||||
winston.remove(transport);
|
||||
|
||||
winston.profile(str);
|
||||
|
||||
winston.query(options, (err: any, results: any) => {
|
||||
|
||||
});
|
||||
|
||||
value = winston.stream(options);
|
||||
|
||||
winston.handleExceptions(transport);
|
||||
winston.exitOnError = bool;
|
||||
|
||||
39
winston/winston.d.ts
vendored
Normal file
39
winston/winston.d.ts
vendored
Normal file
@@ -0,0 +1,39 @@
|
||||
// Type definitions for winston
|
||||
// Project: https://github.com/flatiron/winston
|
||||
// Definitions by: bonnici <https://github.com/bonnici>
|
||||
// Definitions: https://github.com/borisyankov/DefinitelyTyped
|
||||
|
||||
// Imported from: https://github.com/soywiz/typescript-node-definitions/winston.d.ts
|
||||
|
||||
declare module "winston" {
|
||||
export function log(level: string, message: string, metadata?: any): void;
|
||||
export function debug(message: string, metadata?: any): void;
|
||||
export function info(message: string, metadata?: any): void;
|
||||
export function warn(message: string, metadata?: any): void;
|
||||
export function error(message: string, metadata?: any): void;
|
||||
|
||||
export function add(transport: Transport, options: any): void;
|
||||
export function remove(transport: Transport): void;
|
||||
|
||||
export function profile(name: string): void;
|
||||
|
||||
export function query(options: any, done: (err: any, results: any) => void): void;
|
||||
|
||||
export function stream(options: any): any;
|
||||
|
||||
export function handleExceptions(transport: Transport): void;
|
||||
|
||||
export class Logger {
|
||||
|
||||
}
|
||||
|
||||
export interface Transport {
|
||||
}
|
||||
export interface Transports {
|
||||
File: Transport;
|
||||
Console: Transport;
|
||||
Loggly: Transport;
|
||||
}
|
||||
export var transports: Transports;
|
||||
export var exitOnError: boolean;
|
||||
}
|
||||
36
wrench/wrench-tests.ts
Normal file
36
wrench/wrench-tests.ts
Normal file
@@ -0,0 +1,36 @@
|
||||
/// <reference path="wrench.d.ts" />
|
||||
|
||||
import wrench = require('wrench');
|
||||
|
||||
var str: string;
|
||||
var num: number;
|
||||
var bool: boolean;
|
||||
var strArr: string[];
|
||||
var line: wrench.LineReader;
|
||||
|
||||
strArr = wrench.readdirSyncRecursive(str);
|
||||
wrench.rmdirSyncRecursive(str);
|
||||
wrench.rmdirSyncRecursive(str, bool);
|
||||
wrench.copyDirSyncRecursive(str, str);
|
||||
wrench.copyDirSyncRecursive(str, str, {
|
||||
preserve: bool
|
||||
});
|
||||
wrench.chmodSyncRecursive(str, num);
|
||||
wrench.chownSyncRecursive(str, num, num);
|
||||
wrench.mkdirSyncRecursivefunction(str, num);
|
||||
wrench.readdirRecursive(str, (err: Error, files: string[]) => {
|
||||
|
||||
});
|
||||
wrench.rmdirRecursive(str, (err: Error) => {
|
||||
|
||||
});
|
||||
wrench.copyDirRecursive(str, str, (err: Error) => {
|
||||
|
||||
});
|
||||
|
||||
line = new wrench.LineReader(str);
|
||||
line = new wrench.LineReader(str, num);
|
||||
|
||||
str = line.getNextLine();
|
||||
bool = line.hasNextLine();
|
||||
num = line.getBufferAndSetCurrentPosition(num);
|
||||
27
wrench/wrench.d.ts
vendored
Normal file
27
wrench/wrench.d.ts
vendored
Normal file
@@ -0,0 +1,27 @@
|
||||
// Type definitions for wrench
|
||||
// Project: https://github.com/ryanmcgrath/wrench-js
|
||||
// Definitions by: Carlos Ballesteros Velasco <https://github.com/soywiz>
|
||||
// Definitions: https://github.com/borisyankov/DefinitelyTyped
|
||||
|
||||
// Imported from: https://github.com/soywiz/typescript-node-definitions/wrench.d.ts
|
||||
|
||||
declare module "wrench" {
|
||||
export function readdirSyncRecursive(baseDir: string): string[];
|
||||
export function rmdirSyncRecursive(path: string, failSilent?: boolean): void;
|
||||
export function copyDirSyncRecursive(sourceDir: string, newDirLocation: string, opts?: { preserve?: boolean; }): void;
|
||||
export function chmodSyncRecursive(sourceDir: string, filemode: number): void;
|
||||
export function chownSyncRecursive(sourceDir: string, uid: number, gid: number): void;
|
||||
export function mkdirSyncRecursivefunction(path: string, mode: number): void;
|
||||
|
||||
export function readdirRecursive(baseDir: string, fn: (err: Error, files: string[]) => void): void;
|
||||
export function rmdirRecursive(path: string, fn: (err: Error) => void): void;
|
||||
export function copyDirRecursive(srcDir: string, newDir: string, fn: (err: Error) => void): void;
|
||||
|
||||
export class LineReader {
|
||||
constructor (filename: string, bufferSize?: number);
|
||||
|
||||
getBufferAndSetCurrentPosition(position: number): number;
|
||||
hasNextLine(): boolean;
|
||||
getNextLine(): string;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user