├── .gitignore
├── .gitmodules
├── README.md
├── async.d.ts
├── atpl.d.ts
├── aws-sdk.d.ts
├── cheerio.d.ts
├── colors.d.ts
├── connect.d.ts
├── consolidate.d.ts
├── cron.d.ts
├── express-sessions.d.ts
├── express-useragent.d.ts
├── express2.d.ts
├── express3-useragent.d.ts
├── express3.d.ts
├── fibers.d.ts
├── form-data.d.ts
├── fs-extra.d.ts
├── gently.d.ts
├── glob.d.ts
├── imagemagick.d.ts
├── jquery.d.ts
├── less.d.ts
├── memory-cache.d.ts
├── mime.d.ts
├── mkdirp.d.ts
├── mocha.d.ts
├── moment.d.ts
├── mongodb.d.ts
├── mu2.d.ts
├── nconf.d.ts
├── nock.d.ts
├── node.d.ts
├── nodeunit.d.ts
├── optimist.d.ts
├── passport.d.ts
├── q.d.ts
├── redis.d.ts
├── request.d.ts
├── rimraf.d.ts
├── semver.d.ts
├── send.d.ts
├── should.d.ts
├── socket.io.d.ts
├── sprintf.d.ts
├── superagent.d.ts
├── supertest.d.ts
├── swig.d.ts
├── swiz.d.ts
├── teechart.d.ts
├── timezone-js.d.ts
├── twig.d.ts
├── underscore.d.ts
├── underscore.string.d.ts
├── uuid.d.ts
├── watch.d.ts
├── winston.d.ts
└── wrench.d.ts
/.gitignore:
--------------------------------------------------------------------------------
1 | *.js
--------------------------------------------------------------------------------
/.gitmodules:
--------------------------------------------------------------------------------
1 | [submodule "DefinitelyTyped"]
2 | path = DefinitelyTyped
3 | url = https://github.com/soywiz/DefinitelyTyped.git
4 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | This project aims to contain several definitions of common node.js libraries
2 | for TypeScript language in order to have autocomplete support.
3 |
4 | It would be great if the creators of node modules, include definition files
5 | directly on their projects. In the meanwhile this project will do the job.
6 |
7 | Initial definition files are from the TypeScript project "samples" folder, that
8 | can be found here: https://typescript.codeplex.com/SourceControl/BrowseLatest
9 |
10 | You can perform pull requests improving definitions or adding new ones.
11 | I will add them ASAP.
12 |
13 | In order to be able to use it easily, you can create a git submodule for
14 | your project adding this in the .gitmodules file:
15 |
16 | ```
17 | [submodule "typescript-node-definitions"]
18 | path = typescript-node-definitions
19 | url = git://github.com/soywiz/typescript-node-definitions.git
20 | ```
21 |
22 | Also you can create a "app.d.ts" file or similar including all the
23 | definitions file that are you using in your project:
24 |
25 | ```
26 | ///
27 | ///
28 | ///
29 | ///
30 | ```
31 |
--------------------------------------------------------------------------------
/async.d.ts:
--------------------------------------------------------------------------------
1 | // https://github.com/caolan/async
2 |
3 | declare module "async" {
4 | export function each(values: any[], iterator: (item: any, callback: Function) => void, callback: (err: Error) => void): void;
5 | export function map(values: any[], generator: (err: Error, result: any) => void, callback: (err: Error, results: any[]) => void): void;
6 | export function mapSeries(values: any[], generator: (err: Error, result: any) => void, callback: (err: Error, results: any[]) => void): void;
7 | export function mapLimit(values: any[], limit: number, generator: (err: Error, result: any) => void, callback: (err: Error, results: any[]) => void): void;
8 | export function filter(values: any[], generator: (err: Error, result: boolean) => void, callback: (err: Error, results: any[]) => void): void;
9 | export function parallel(funcs: any[], callback?: (err, result: any) => void): void;
10 | export function parallel(funcs: any, callback?: (err, result: any) => void): void;
11 | export function parallelLimit(funcs: any[], limit: number, callback?: (err, result: any) => void): void;
12 | export function parallelLimit(funcs: any, limit: number, callback?: (err, result: any) => void): void;
13 | //export function series(funcs: ((done: () => void) => void)[]);
14 | export function series(funcs: any[], callback?: (err, result: any) => void): void;
15 | export function waterfall(funcs: any[], callback?: (err, result: any) => void): void;
16 | }
17 |
--------------------------------------------------------------------------------
/atpl.d.ts:
--------------------------------------------------------------------------------
1 | declare module "atpl" {
2 | export function compile(templateString, options);
3 | export function __express(filename, options, callback);
4 |
5 | export function registerExtension(items: any);
6 | export function registerTags(items: any);
7 | export function registerFunctions(items: any);
8 | export function registerFilters(items: any);
9 | export function registerTests(items: any);
10 | }
--------------------------------------------------------------------------------
/aws-sdk.d.ts:
--------------------------------------------------------------------------------
1 | ///
2 |
3 | declare module "aws-sdk" {
4 |
5 | export var config;
6 |
7 | export function Config(json);
8 |
9 | export class Credentials {
10 | constructor(accessKeyId: string, secretAccessKey: string);
11 | constructor(accessKeyId: string, secretAccessKey: string, sessionToken: string);
12 |
13 | accessKeyId: string;
14 | }
15 |
16 | export interface ClientConfig {
17 | credentials: Credentials;
18 | region: string;
19 | }
20 |
21 | export class SQS {
22 | constructor(options?: any);
23 | public client: Sqs.Client;
24 | }
25 |
26 | export class SES {
27 | constructor(options?: any);
28 | public client: Ses.Client;
29 | }
30 |
31 | export class SNS {
32 | constructor(options?: any);
33 | public client: Sns.Client;
34 | }
35 |
36 | export class SimpleWorkflow {
37 | constructor(options?: any);
38 | public client: Swf.Client;
39 | }
40 |
41 | export class S3 {
42 | constructor(options?: any);
43 | public client: s3.Client;
44 | }
45 |
46 | module Sqs {
47 |
48 | export interface Client {
49 | config: ClientConfig;
50 |
51 | sendMessage(params: SendMessageRequest, callback: (err: any, data: SendMessageResult) => void );
52 | sendMessageBatch(params: SendMessageBatchRequest, callback: (err: any, data: SendMessageBatchResult) => void );
53 | receiveMessage(params: ReceiveMessageRequest, callback: (err: any, data: ReceiveMessageResult) => void );
54 | deleteMessage(params: DeleteMessageRequest, callback: (err: any, data: any) => void );
55 | deleteMessageBatch(params: DeleteMessageBatchRequest, callback: (err: any, data: DeleteMessageBatchResult) => void );
56 | createQueue(params: CreateQueueRequest, callback: (err: any, data: CreateQueueResult) => void );
57 | deleteQueue(params: DeleteQueueRequest, callback: (err: any, data: any) => void );
58 | }
59 |
60 | export interface SendMessageRequest {
61 | QueueUrl? :string;
62 | MessageBody? :string;
63 | DelaySeconds? :number;
64 | }
65 |
66 | export interface ReceiveMessageRequest {
67 | QueueUrl? :string;
68 | MaxNumberOfMessages? :number;
69 | VisibilityTimeout? :number;
70 | AttributeNames? :string[];
71 | }
72 |
73 | export interface DeleteMessageBatchRequest {
74 | QueueUrl? :string;
75 | Entries? :DeleteMessageBatchRequestEntry[];
76 | }
77 |
78 | export interface DeleteMessageBatchRequestEntry {
79 | Id :string;
80 | ReceiptHandle :string;
81 | }
82 |
83 | export interface DeleteMessageRequest {
84 | QueueUrl? :string;
85 | ReceiptHandle? :string;
86 | }
87 |
88 | export class Attribute {
89 | Name :string;
90 | Value :string;
91 | }
92 |
93 | export interface SendMessageBatchRequest {
94 | QueueUrl? :string;
95 | Entries? :SendMessageBatchRequestEntry[];
96 | }
97 |
98 | export class SendMessageBatchRequestEntry {
99 | Id :string;
100 | MessageBody :string;
101 | DelaySeconds :number;
102 | }
103 |
104 | export interface CreateQueueRequest {
105 | QueueName? :string;
106 | DefaultVisibilityTimeout? :number;
107 | DelaySeconds? :number;
108 | Attributes? :Attribute[];
109 | }
110 |
111 | export interface DeleteQueueRequest {
112 | QueueUrl? :string;
113 | }
114 |
115 | export class SendMessageResult {
116 | MessageId :string;
117 | MD5OfMessageBody :string;
118 | }
119 |
120 | export class ReceiveMessageResult {
121 | Messages :Message[];
122 | }
123 |
124 | export class Message {
125 | MessageId :string;
126 | ReceiptHandle :string;
127 | MD5OfBody :string;
128 | Body :string;
129 | Attributes :Attribute[];
130 | }
131 |
132 | export class DeleteMessageBatchResult {
133 | Successful :DeleteMessageBatchResultEntry[];
134 | Failed :BatchResultErrorEntry[];
135 | }
136 |
137 | export class DeleteMessageBatchResultEntry {
138 | Id :string;
139 | }
140 |
141 | export class BatchResultErrorEntry {
142 | Id :string;
143 | Code :string;
144 | Message :string;
145 | SenderFault :string;
146 | }
147 |
148 | export class SendMessageBatchResult {
149 | Successful :SendMessageBatchResultEntry[];
150 | Failed :BatchResultErrorEntry[];
151 | }
152 |
153 | export class SendMessageBatchResultEntry {
154 | Id :string;
155 | MessageId :string;
156 | MD5OfMessageBody :string;
157 | }
158 |
159 | export class CreateQueueResult {
160 | QueueUrl :string;
161 | }
162 |
163 |
164 |
165 | }
166 |
167 | module Ses {
168 |
169 | export interface Client {
170 | config: ClientConfig;
171 |
172 | sendEmail(params: any, callback: (err: any, data: SendEmailResult) => void );
173 | }
174 |
175 | export interface SendEmailRequest {
176 | Source: string;
177 | Destination: Destination;
178 | Message: Message;
179 | ReplyToAddresses: string[];
180 | ReturnPath: string;
181 | }
182 |
183 | export class Destination {
184 | ToAddresses: string[];
185 | CcAddresses: string[];
186 | BccAddresses: string[];
187 | }
188 |
189 | export class Message {
190 | Subject: Content;
191 | Body: Body;
192 | }
193 |
194 | export class Content {
195 | Data: string;
196 | Charset: string;
197 | }
198 |
199 | export class Body {
200 | Text: Content;
201 | Html: Content;
202 | }
203 |
204 | export class SendEmailResult {
205 | MessageId: string;
206 | }
207 |
208 | }
209 |
210 | module Swf {
211 |
212 | export class Client {
213 | //constructor(options?: any);
214 | public config: ClientConfig;
215 | countClosedWorkflowExecutions(params: any, callback: (err: any, data: any) => void );
216 | countOpenWorkflowExecutions(params: any, callback: (err: any, data: any) => void );
217 | countPendingActivityTasks(params: any, callback: (err: any, data: any) => void );
218 | countPendingDecisionTasks(params: any, callback: (err: any, data: any) => void );
219 | deprecateActivityType(params: any, callback: (err: any, data: any) => void );
220 | deprecateDomain(params: any, callback: (err: any, data: any) => void );
221 | deprecateWorkflowType(params: any, callback: (err: any, data: any) => void );
222 | describeActivityType(params: any, callback: (err: any, data: any) => void );
223 | describeDomain(params: any, callback: (err: any, data: any) => void );
224 | describeWorkflowExecution(params: any, callback: (err: any, data: any) => void );
225 | describeWorkflowType(params: any, callback: (err: any, data: any) => void );
226 | getWorkflowExecutionHistory(params: any, callback: (err: any, data: any) => void );
227 | listActivityTypes(params: any, callback: (err: any, data: any) => void );
228 | listClosedWorkflowExecutions(params: any, callback: (err: any, data: any) => void );
229 | listDomains(params: any, callback: (err: any, data: any) => void );
230 | listOpenWorkflowExecutions(params: any, callback: (err: any, data: any) => void );
231 | listWorkflowTypes(params: any, callback: (err: any, data: any) => void );
232 | pollForActivityTask(params: any, callback: (err: any, data: ActivityTask) => void );
233 | pollForDecisionTask(params: any, callback: (err: any, data: DecisionTask) => void );
234 | recordActivityTaskHeartbeat(params: any, callback: (err: any, data: any) => void );
235 | registerActivityType(params: any, callback: (err: any, data: any) => void );
236 | registerDomain(params: any, callback: (err: any, data: any) => void );
237 | registerWorkflowType(params: any, callback: (err: any, data: any) => void );
238 | requestCancelWorkflowExecution(params: any, callback: (err: any, data: any) => void );
239 | respondActivityTaskCanceled(params: RespondActivityTaskCanceledRequest, callback: (err: any, data: any) => void );
240 | respondActivityTaskCompleted(params: RespondActivityTaskCompletedRequest, callback: (err: any, data: any) => void );
241 | respondActivityTaskFailed(params: RespondActivityTaskFailedRequest, callback: (err: any, data: any) => void );
242 | respondDecisionTaskCompleted(params: RespondDecisionTaskCompletedRequest, callback: (err: any, data: any) => void );
243 | signalWorkflowExecution(params: any, callback: (err: any, data: any) => void );
244 | startWorkflowExecution(params: any, callback: (err: any, data: StartWorkflowExecutionResult) => void );
245 | terminateWorkflowExecution(params: any, callback: (err: any, data: any) => void );
246 | }
247 |
248 | export interface PollForActivityTaskRequest {
249 | domain? :string;
250 | taskList? :TaskList;
251 | identity? :string;
252 | }
253 |
254 | export interface TaskList {
255 | name? :string;
256 | }
257 |
258 | export interface PollForDecisionTaskRequest {
259 | domain? :string;
260 | taskList? :TaskList;
261 | identity? :string;
262 | nextPageToken? :string;
263 | maximumPageSize? :number;
264 | reverseOrder? :Boolean;
265 | }
266 |
267 |
268 | export interface StartWorkflowExecutionRequest {
269 | domain? :string;
270 | workflowId? :string;
271 | workflowType? :WorkflowType;
272 | taskList? :TaskList;
273 | input? :string;
274 | executionStartToCloseTimeout? :string;
275 | tagList? :string[];
276 | taskStartToCloseTimeout? :string;
277 | childPolicy? :string;
278 | }
279 |
280 | export interface WorkflowType {
281 | name? :string;
282 | version? :string;
283 | }
284 |
285 |
286 | export interface RespondDecisionTaskCompletedRequest {
287 | taskToken? :string;
288 | decisions? :Decision[];
289 | executionContext? :string;
290 | }
291 |
292 | export interface Decision {
293 | decisionType? :string;
294 | scheduleActivityTaskDecisionAttributes? :ScheduleActivityTaskDecisionAttributes;
295 | requestCancelActivityTaskDecisionAttributes? :RequestCancelActivityTaskDecisionAttributes;
296 | completeWorkflowExecutionDecisionAttributes? :CompleteWorkflowExecutionDecisionAttributes;
297 | failWorkflowExecutionDecisionAttributes? :FailWorkflowExecutionDecisionAttributes;
298 | cancelWorkflowExecutionDecisionAttributes? :CancelWorkflowExecutionDecisionAttributes;
299 | continueAsNewWorkflowExecutionDecisionAttributes? :ContinueAsNewWorkflowExecutionDecisionAttributes;
300 | recordMarkerDecisionAttributes? :RecordMarkerDecisionAttributes;
301 | startTimerDecisionAttributes? :StartTimerDecisionAttributes;
302 | cancelTimerDecisionAttributes? :CancelTimerDecisionAttributes;
303 | signalExternalWorkflowExecutionDecisionAttributes? :SignalExternalWorkflowExecutionDecisionAttributes;
304 | requestCancelExternalWorkflowExecutionDecisionAttributes? :RequestCancelExternalWorkflowExecutionDecisionAttributes;
305 | startChildWorkflowExecutionDecisionAttributes? :StartChildWorkflowExecutionDecisionAttributes;
306 | }
307 |
308 | export interface ScheduleActivityTaskDecisionAttributes {
309 | activityType? :ActivityType;
310 | activityId? :string;
311 | control? :string;
312 | input? :string;
313 | scheduleToCloseTimeout? :string;
314 | taskList? :TaskList;
315 | scheduleToStartTimeout? :string;
316 | startToCloseTimeout? :string;
317 | heartbeatTimeout? :string;
318 | }
319 |
320 | export interface ActivityType {
321 | name? :string;
322 | version? :string;
323 | }
324 |
325 | export interface RequestCancelActivityTaskDecisionAttributes {
326 | activityId? :string;
327 | }
328 |
329 | export interface CompleteWorkflowExecutionDecisionAttributes {
330 | result? :string;
331 | }
332 |
333 | export interface FailWorkflowExecutionDecisionAttributes {
334 | reason? :string;
335 | details? :string;
336 | }
337 |
338 | export interface CancelWorkflowExecutionDecisionAttributes {
339 | details? :string;
340 | }
341 |
342 | export interface ContinueAsNewWorkflowExecutionDecisionAttributes {
343 | input? :string;
344 | executionStartToCloseTimeout? :string;
345 | taskList? :TaskList;
346 | taskStartToCloseTimeout? :string;
347 | childPolicy? :string;
348 | tagList? :string[];
349 | workflowTypeVersion? :string;
350 | }
351 |
352 | export interface RecordMarkerDecisionAttributes {
353 | markerName? :string;
354 | details? :string;
355 | }
356 |
357 | export interface StartTimerDecisionAttributes {
358 | timerId? :string;
359 | control? :string;
360 | startToFireTimeout? :string;
361 | }
362 |
363 | export interface CancelTimerDecisionAttributes {
364 | timerId? :string;
365 | }
366 |
367 | export interface SignalExternalWorkflowExecutionDecisionAttributes {
368 | workflowId? :string;
369 | runId? :string;
370 | signalName? :string;
371 | input? :string;
372 | control? :string;
373 | }
374 |
375 | export interface RequestCancelExternalWorkflowExecutionDecisionAttributes {
376 | workflowId? :string;
377 | runId? :string;
378 | control? :string;
379 | }
380 |
381 | export interface StartChildWorkflowExecutionDecisionAttributes {
382 | workflowType? :WorkflowType;
383 | workflowId? :string;
384 | control? :string;
385 | input? :string;
386 | executionStartToCloseTimeout? :string;
387 | taskList? :TaskList;
388 | taskStartToCloseTimeout? :string;
389 | childPolicy? :string;
390 | tagList? :string[];
391 | }
392 |
393 | export interface RespondActivityTaskCompletedRequest {
394 | taskToken? :string;
395 | result? :string;
396 | }
397 |
398 | export interface RespondActivityTaskFailedRequest {
399 | taskToken? :string;
400 | reason? :string;
401 | details? :string;
402 | }
403 |
404 | export interface RespondActivityTaskCanceledRequest {
405 | taskToken? :string;
406 | details? :string;
407 | }
408 |
409 | export interface DecisionTask {
410 | taskToken? :string;
411 | startedEventId? :number;
412 | workflowExecution? :WorkflowExecution;
413 | workflowType? :WorkflowType;
414 | events? :HistoryEvent[];
415 | nextPageToken? :string;
416 | previousStartedEventId? :number;
417 | }
418 |
419 | export interface WorkflowExecution {
420 | workflowId? :string;
421 | runId? :string;
422 | }
423 |
424 | export interface HistoryEvent {
425 | eventTimestamp? :any;
426 | eventType? :string;
427 | eventId? :number;
428 | workflowExecutionStartedEventAttributes? :WorkflowExecutionStartedEventAttributes;
429 | workflowExecutionCompletedEventAttributes? :WorkflowExecutionCompletedEventAttributes;
430 | completeWorkflowExecutionFailedEventAttributes? :CompleteWorkflowExecutionFailedEventAttributes;
431 | workflowExecutionFailedEventAttributes? :WorkflowExecutionFailedEventAttributes;
432 | failWorkflowExecutionFailedEventAttributes? :FailWorkflowExecutionFailedEventAttributes;
433 | workflowExecutionTimedOutEventAttributes? :WorkflowExecutionTimedOutEventAttributes;
434 | workflowExecutionCanceledEventAttributes? :WorkflowExecutionCanceledEventAttributes;
435 | cancelWorkflowExecutionFailedEventAttributes? :CancelWorkflowExecutionFailedEventAttributes;
436 | workflowExecutionContinuedAsNewEventAttributes? :WorkflowExecutionContinuedAsNewEventAttributes;
437 | continueAsNewWorkflowExecutionFailedEventAttributes? :ContinueAsNewWorkflowExecutionFailedEventAttributes;
438 | workflowExecutionTerminatedEventAttributes? :WorkflowExecutionTerminatedEventAttributes;
439 | workflowExecutionCancelRequestedEventAttributes? :WorkflowExecutionCancelRequestedEventAttributes;
440 | decisionTaskScheduledEventAttributes? :DecisionTaskScheduledEventAttributes;
441 | decisionTaskStartedEventAttributes? :DecisionTaskStartedEventAttributes;
442 | decisionTaskCompletedEventAttributes? :DecisionTaskCompletedEventAttributes;
443 | decisionTaskTimedOutEventAttributes? :DecisionTaskTimedOutEventAttributes;
444 | activityTaskScheduledEventAttributes? :ActivityTaskScheduledEventAttributes;
445 | activityTaskStartedEventAttributes? :ActivityTaskStartedEventAttributes;
446 | activityTaskCompletedEventAttributes? :ActivityTaskCompletedEventAttributes;
447 | activityTaskFailedEventAttributes? :ActivityTaskFailedEventAttributes;
448 | activityTaskTimedOutEventAttributes? :ActivityTaskTimedOutEventAttributes;
449 | activityTaskCanceledEventAttributes? :ActivityTaskCanceledEventAttributes;
450 | activityTaskCancelRequestedEventAttributes? :ActivityTaskCancelRequestedEventAttributes;
451 | workflowExecutionSignaledEventAttributes? :WorkflowExecutionSignaledEventAttributes;
452 | markerRecordedEventAttributes? :MarkerRecordedEventAttributes;
453 | timerStartedEventAttributes? :TimerStartedEventAttributes;
454 | timerFiredEventAttributes? :TimerFiredEventAttributes;
455 | timerCanceledEventAttributes? :TimerCanceledEventAttributes;
456 | startChildWorkflowExecutionInitiatedEventAttributes? :StartChildWorkflowExecutionInitiatedEventAttributes;
457 | childWorkflowExecutionStartedEventAttributes? :ChildWorkflowExecutionStartedEventAttributes;
458 | childWorkflowExecutionCompletedEventAttributes? :ChildWorkflowExecutionCompletedEventAttributes;
459 | childWorkflowExecutionFailedEventAttributes? :ChildWorkflowExecutionFailedEventAttributes;
460 | childWorkflowExecutionTimedOutEventAttributes? :ChildWorkflowExecutionTimedOutEventAttributes;
461 | childWorkflowExecutionCanceledEventAttributes? :ChildWorkflowExecutionCanceledEventAttributes;
462 | childWorkflowExecutionTerminatedEventAttributes? :ChildWorkflowExecutionTerminatedEventAttributes;
463 | signalExternalWorkflowExecutionInitiatedEventAttributes? :SignalExternalWorkflowExecutionInitiatedEventAttributes;
464 | externalWorkflowExecutionSignaledEventAttributes? :ExternalWorkflowExecutionSignaledEventAttributes;
465 | signalExternalWorkflowExecutionFailedEventAttributes? :SignalExternalWorkflowExecutionFailedEventAttributes;
466 | externalWorkflowExecutionCancelRequestedEventAttributes? :ExternalWorkflowExecutionCancelRequestedEventAttributes;
467 | requestCancelExternalWorkflowExecutionInitiatedEventAttributes? :RequestCancelExternalWorkflowExecutionInitiatedEventAttributes;
468 | requestCancelExternalWorkflowExecutionFailedEventAttributes? :RequestCancelExternalWorkflowExecutionFailedEventAttributes;
469 | scheduleActivityTaskFailedEventAttributes? :ScheduleActivityTaskFailedEventAttributes;
470 | requestCancelActivityTaskFailedEventAttributes? :RequestCancelActivityTaskFailedEventAttributes;
471 | startTimerFailedEventAttributes? :StartTimerFailedEventAttributes;
472 | cancelTimerFailedEventAttributes? :CancelTimerFailedEventAttributes;
473 | startChildWorkflowExecutionFailedEventAttributes? :StartChildWorkflowExecutionFailedEventAttributes;
474 | }
475 |
476 | export interface WorkflowExecutionStartedEventAttributes {
477 | input? :string;
478 | executionStartToCloseTimeout? :string;
479 | taskStartToCloseTimeout? :string;
480 | childPolicy? :string;
481 | taskList? :TaskList;
482 | workflowType? :WorkflowType;
483 | tagList? :string[];
484 | continuedExecutionRunId? :string;
485 | parentWorkflowExecution? :WorkflowExecution;
486 | parentInitiatedEventId? :number;
487 | }
488 |
489 | export interface WorkflowExecutionCompletedEventAttributes {
490 | result? :string;
491 | decisionTaskCompletedEventId? :number;
492 | }
493 |
494 | export interface CompleteWorkflowExecutionFailedEventAttributes {
495 | cause? :string;
496 | decisionTaskCompletedEventId? :number;
497 | }
498 |
499 | export interface WorkflowExecutionFailedEventAttributes {
500 | reason? :string;
501 | details? :string;
502 | decisionTaskCompletedEventId? :number;
503 | }
504 |
505 | export interface FailWorkflowExecutionFailedEventAttributes {
506 | cause? :string;
507 | decisionTaskCompletedEventId? :number;
508 | }
509 |
510 | export interface WorkflowExecutionTimedOutEventAttributes {
511 | timeoutType? :string;
512 | childPolicy? :string;
513 | }
514 |
515 | export interface WorkflowExecutionCanceledEventAttributes {
516 | details? :string;
517 | decisionTaskCompletedEventId? :number;
518 | }
519 |
520 | export interface CancelWorkflowExecutionFailedEventAttributes {
521 | cause? :string;
522 | decisionTaskCompletedEventId? :number;
523 | }
524 |
525 | export interface WorkflowExecutionContinuedAsNewEventAttributes {
526 | input? :string;
527 | decisionTaskCompletedEventId? :number;
528 | newExecutionRunId? :string;
529 | executionStartToCloseTimeout? :string;
530 | taskList? :TaskList;
531 | taskStartToCloseTimeout? :string;
532 | childPolicy? :string;
533 | tagList? :string[];
534 | workflowType? :WorkflowType;
535 | }
536 |
537 | export interface ContinueAsNewWorkflowExecutionFailedEventAttributes {
538 | cause? :string;
539 | decisionTaskCompletedEventId? :number;
540 | }
541 |
542 | export interface WorkflowExecutionTerminatedEventAttributes {
543 | reason? :string;
544 | details? :string;
545 | childPolicy? :string;
546 | cause? :string;
547 | }
548 |
549 | export interface WorkflowExecutionCancelRequestedEventAttributes {
550 | externalWorkflowExecution? :WorkflowExecution;
551 | externalInitiatedEventId? :number;
552 | cause? :string;
553 | }
554 |
555 | export interface DecisionTaskScheduledEventAttributes {
556 | taskList? :TaskList;
557 | startToCloseTimeout? :string;
558 | }
559 |
560 | export interface DecisionTaskStartedEventAttributes {
561 | identity? :string;
562 | scheduledEventId? :number;
563 | }
564 |
565 | export interface DecisionTaskCompletedEventAttributes {
566 | executionContext? :string;
567 | scheduledEventId? :number;
568 | startedEventId? :number;
569 | }
570 |
571 | export interface DecisionTaskTimedOutEventAttributes {
572 | timeoutType? :string;
573 | scheduledEventId? :number;
574 | startedEventId? :number;
575 | }
576 |
577 | export interface ActivityTaskScheduledEventAttributes {
578 | activityType? :ActivityType;
579 | activityId? :string;
580 | input? :string;
581 | control? :string;
582 | scheduleToStartTimeout? :string;
583 | scheduleToCloseTimeout? :string;
584 | startToCloseTimeout? :string;
585 | taskList? :TaskList;
586 | decisionTaskCompletedEventId? :number;
587 | heartbeatTimeout? :string;
588 | }
589 |
590 | export interface ActivityTaskStartedEventAttributes {
591 | identity? :string;
592 | scheduledEventId? :number;
593 | }
594 |
595 | export interface ActivityTaskCompletedEventAttributes {
596 | result? :string;
597 | scheduledEventId? :number;
598 | startedEventId? :number;
599 | }
600 |
601 | export interface ActivityTaskFailedEventAttributes {
602 | reason? :string;
603 | details? :string;
604 | scheduledEventId? :number;
605 | startedEventId? :number;
606 | }
607 |
608 | export interface ActivityTaskTimedOutEventAttributes {
609 | timeoutType? :string;
610 | scheduledEventId? :number;
611 | startedEventId? :number;
612 | details? :string;
613 | }
614 |
615 | export interface ActivityTaskCanceledEventAttributes {
616 | details? :string;
617 | scheduledEventId? :number;
618 | startedEventId? :number;
619 | latestCancelRequestedEventId? :number;
620 | }
621 |
622 | export interface ActivityTaskCancelRequestedEventAttributes {
623 | decisionTaskCompletedEventId? :number;
624 | activityId? :string;
625 | }
626 |
627 | export interface WorkflowExecutionSignaledEventAttributes {
628 | signalName? :string;
629 | input? :string;
630 | externalWorkflowExecution? :WorkflowExecution;
631 | externalInitiatedEventId? :number;
632 | }
633 |
634 | export interface MarkerRecordedEventAttributes {
635 | markerName? :string;
636 | details? :string;
637 | decisionTaskCompletedEventId? :number;
638 | }
639 |
640 | export interface TimerStartedEventAttributes {
641 | timerId? :string;
642 | control? :string;
643 | startToFireTimeout? :string;
644 | decisionTaskCompletedEventId? :number;
645 | }
646 |
647 | export interface TimerFiredEventAttributes {
648 | timerId? :string;
649 | startedEventId? :number;
650 | }
651 |
652 | export interface TimerCanceledEventAttributes {
653 | timerId? :string;
654 | startedEventId? :number;
655 | decisionTaskCompletedEventId? :number;
656 | }
657 |
658 | export interface StartChildWorkflowExecutionInitiatedEventAttributes {
659 | workflowId? :string;
660 | workflowType? :WorkflowType;
661 | control? :string;
662 | input? :string;
663 | executionStartToCloseTimeout? :string;
664 | taskList? :TaskList;
665 | decisionTaskCompletedEventId? :number;
666 | childPolicy? :string;
667 | taskStartToCloseTimeout? :string;
668 | tagList? :string[];
669 | }
670 |
671 | export interface ChildWorkflowExecutionStartedEventAttributes {
672 | workflowExecution? :WorkflowExecution;
673 | workflowType? :WorkflowType;
674 | initiatedEventId? :number;
675 | }
676 |
677 | export interface ChildWorkflowExecutionCompletedEventAttributes {
678 | workflowExecution? :WorkflowExecution;
679 | workflowType? :WorkflowType;
680 | result? :string;
681 | initiatedEventId? :number;
682 | startedEventId? :number;
683 | }
684 |
685 | export interface ChildWorkflowExecutionFailedEventAttributes {
686 | workflowExecution? :WorkflowExecution;
687 | workflowType? :WorkflowType;
688 | reason? :string;
689 | details? :string;
690 | initiatedEventId? :number;
691 | startedEventId? :number;
692 | }
693 |
694 | export interface ChildWorkflowExecutionTimedOutEventAttributes {
695 | workflowExecution? :WorkflowExecution;
696 | workflowType? :WorkflowType;
697 | timeoutType? :string;
698 | initiatedEventId? :number;
699 | startedEventId? :number;
700 | }
701 |
702 | export interface ChildWorkflowExecutionCanceledEventAttributes {
703 | workflowExecution? :WorkflowExecution;
704 | workflowType? :WorkflowType;
705 | details? :string;
706 | initiatedEventId? :number;
707 | startedEventId? :number;
708 | }
709 |
710 | export interface ChildWorkflowExecutionTerminatedEventAttributes {
711 | workflowExecution? :WorkflowExecution;
712 | workflowType? :WorkflowType;
713 | initiatedEventId? :number;
714 | startedEventId? :number;
715 | }
716 |
717 | export interface SignalExternalWorkflowExecutionInitiatedEventAttributes {
718 | workflowId? :string;
719 | runId? :string;
720 | signalName? :string;
721 | input? :string;
722 | decisionTaskCompletedEventId? :number;
723 | control? :string;
724 | }
725 |
726 | export interface ExternalWorkflowExecutionSignaledEventAttributes {
727 | workflowExecution? :WorkflowExecution;
728 | initiatedEventId? :number;
729 | }
730 |
731 | export interface SignalExternalWorkflowExecutionFailedEventAttributes {
732 | workflowId? :string;
733 | runId? :string;
734 | cause? :string;
735 | initiatedEventId? :number;
736 | decisionTaskCompletedEventId? :number;
737 | control? :string;
738 | }
739 |
740 | export interface ExternalWorkflowExecutionCancelRequestedEventAttributes {
741 | workflowExecution? :WorkflowExecution;
742 | initiatedEventId? :number;
743 | }
744 |
745 | export interface RequestCancelExternalWorkflowExecutionInitiatedEventAttributes {
746 | workflowId? :string;
747 | runId? :string;
748 | decisionTaskCompletedEventId? :number;
749 | control? :string;
750 | }
751 |
752 | export interface RequestCancelExternalWorkflowExecutionFailedEventAttributes {
753 | workflowId? :string;
754 | runId? :string;
755 | cause? :string;
756 | initiatedEventId? :number;
757 | decisionTaskCompletedEventId? :number;
758 | control? :string;
759 | }
760 |
761 | export interface ScheduleActivityTaskFailedEventAttributes {
762 | activityType? :ActivityType;
763 | activityId? :string;
764 | cause? :string;
765 | decisionTaskCompletedEventId? :number;
766 | }
767 |
768 | export interface RequestCancelActivityTaskFailedEventAttributes {
769 | activityId? :string;
770 | cause? :string;
771 | decisionTaskCompletedEventId? :number;
772 | }
773 |
774 | export interface StartTimerFailedEventAttributes {
775 | timerId? :string;
776 | cause? :string;
777 | decisionTaskCompletedEventId? :number;
778 | }
779 |
780 | export interface CancelTimerFailedEventAttributes {
781 | timerId? :string;
782 | cause? :string;
783 | decisionTaskCompletedEventId? :number;
784 | }
785 |
786 | export interface StartChildWorkflowExecutionFailedEventAttributes {
787 | workflowType? :WorkflowType;
788 | cause? :string;
789 | workflowId? :string;
790 | initiatedEventId? :number;
791 | decisionTaskCompletedEventId? :number;
792 | control? :string;
793 | }
794 |
795 | export interface ActivityTask {
796 | taskToken? :string;
797 | activityId? :string;
798 | startedEventId? :number;
799 | workflowExecution? :WorkflowExecution;
800 | activityType? :ActivityType;
801 | input? :string;
802 | }
803 |
804 | export interface PollForActivityTaskResult {
805 | activityTask? :ActivityTask;
806 | }
807 |
808 | export interface PollForDecisionTaskResult {
809 | decisionTask? :DecisionTask;
810 | }
811 |
812 | export interface StartWorkflowExecutionResult {
813 | run? :Run;
814 | }
815 |
816 | export interface Run {
817 | runId? :string;
818 | }
819 |
820 |
821 |
822 | }
823 |
824 | module Sns {
825 |
826 | export interface Client {
827 | config: ClientConfig;
828 |
829 | publicTopic(params: PublishRequest, callback: (err: any, data: PublishResult) => void );
830 | createTopic(params: CreateTopicRequest, callback: (err: any, data: CreateTopicResult) => void );
831 | deleteTopic(params: DeleteTopicRequest, callback: (err: any, data: any) => void );
832 | }
833 |
834 | export interface PublishRequest {
835 | TopicArn?: string;
836 | Message?: string;
837 | MessageStructure?: string;
838 | Subject?: string;
839 | }
840 |
841 | export interface PublishResult {
842 | MessageId?: string;
843 | }
844 |
845 | export interface CreateTopicRequest {
846 | Name?: string;
847 | }
848 |
849 | export interface CreateTopicResult {
850 | TopicArn?: string;
851 | }
852 |
853 | export interface DeleteTopicRequest {
854 | TopicArn?: string;
855 | }
856 |
857 | }
858 |
859 | module s3 {
860 |
861 | export interface Client {
862 | config: ClientConfig;
863 |
864 | putObject(params: PutObjectRequest, callback: (err: any, data: any) => void );
865 | getObject(params: GetObjectRequest, callback: (err: any, data: any) => void );
866 | }
867 |
868 | export interface PutObjectRequest {
869 | ACL?: string;
870 | Body?: any;
871 | Bucket: string;
872 | CacheControl?: string;
873 | ContentDisposition?: string;
874 | ContentEncoding?: string;
875 | ContentLanguage?: string;
876 | ContentLength?: string;
877 | ContentMD5?: string;
878 | ContentType?: string;
879 | Expires?: any;
880 | GrantFullControl?: string;
881 | GrantRead?: string;
882 | GrantReadACP?: string;
883 | GrantWriteACP?: string;
884 | Key: string;
885 | Metadata?: string[];
886 | ServerSideEncryption?: string;
887 | StorageClass?: string;
888 | WebsiteRedirectLocation?: string;
889 | }
890 |
891 | export interface GetObjectRequest {
892 | Bucket: string;
893 | IfMatch?: string;
894 | IfModifiedSince?: any;
895 | IfNoneMatch?: string;
896 | IfUnmodifiedSince?: any;
897 | Key: string;
898 | Range?: string;
899 | ResponseCacheControl?: string;
900 | ResponseContentDisposition?: string;
901 | ResponseContentEncoding?: string;
902 | ResponseContentLanguage?: string;
903 | ResponseContentType?: string;
904 | ResponseExpires?: any;
905 | VersionId?: string;
906 | }
907 |
908 | }
909 | }
--------------------------------------------------------------------------------
/cheerio.d.ts:
--------------------------------------------------------------------------------
1 | module "cheerio" {
2 | export import cheerio = module("cheerio");
3 |
4 | function load(body: string, opts?: CheerioOpt) : CheerioObj;
5 | function (selector: string, body: string): CheerioObj;
6 | function (selector: string, context: string, root: string): CheerioObj;
7 |
8 | interface CheerioOpt {
9 | ignoreWhitespace: bool;
10 | xmlMode: bool;
11 | lowerCaseTags: bool;
12 | }
13 |
14 | interface CheerioObj {
15 | // Selectors
16 | (selector: string, context?: string, root?: string): CheerioSelector;
17 | (selector: string, context?: CheerioObj, root?: string): CheerioSelector;
18 | (selector: CheerioObj, context?: string, root?: string): CheerioSelector;
19 | (selector: CheerioObj, context?: CheerioObj, root?: string): CheerioSelector;
20 |
21 | // Rendering
22 | html(selector?: string): string;
23 |
24 | // Utilities
25 | root(): CheerioSelector;
26 | dom(): any;
27 | isArray(obj: any): bool;
28 | inArray(elem: any, array: any[]): number;
29 | makeArray(obj: any): any[];
30 | each(collection: any, callback: (indexInArray: any, valueOfElement: any) => any): any;
31 | merge(first: any[], second: any[]): any[];
32 | }
33 |
34 | interface CheerioSelector {
35 | // Array functions
36 | length: number;
37 | [x: string]: HTMLElement;
38 | [x: number]: HTMLElement;
39 |
40 | // Attributes
41 | attr(attributeName: string, value: any): CheerioSelector;
42 | attr(map: { [key: any]: any; }): string;
43 | attr(attributeName: string, func: (index: any, attr: any) => any): CheerioSelector;
44 |
45 | removeAttr(attributeName: any): CheerioSelector;
46 |
47 | hasClass(className: string): bool;
48 |
49 | addClass(classNames: string): CheerioSelector;
50 | addClass(func: (index: any, currentClass: any) => CheerioSelector);
51 |
52 | removeClass(className?: any): CheerioSelector;
53 | removeClass(func: (index: any, cls: any) => any): CheerioSelector;
54 |
55 | // Traversing
56 | find(selector: string): CheerioSelector;
57 | find(element: any): CheerioSelector;
58 | find(obj: CheerioSelector): CheerioSelector;
59 |
60 | parent(selector?: string): CheerioSelector;
61 |
62 | next(selector?: string): CheerioSelector;
63 |
64 | prev(selector?: string): CheerioSelector;
65 |
66 | siblings(selector?: string): CheerioSelector;
67 |
68 | children(selector?: any): CheerioSelector;
69 |
70 | each(func: (index: any, elem: Element) => CheerioSelector);
71 |
72 | map(callback: (index: any, domElement: Element) =>any): CheerioSelector;
73 |
74 | filter(selector: string): CheerioSelector;
75 | filter(func: (index: any) =>any): CheerioSelector;
76 | filter(element: any): CheerioSelector;
77 | filter(obj: CheerioSelector): CheerioSelector;
78 |
79 | first(): CheerioSelector;
80 |
81 | last(): CheerioSelector;
82 |
83 | eq(index: number): CheerioSelector;
84 |
85 | // Manipulation
86 | append(...content: any[]): CheerioSelector;
87 | append(func: (index: any, html: any) => any);
88 |
89 | prepend(...content: any[]): CheerioSelector;
90 | prepend(func: (index: any, html: any) =>any): CheerioSelector;
91 |
92 | after(...content: any[]): CheerioSelector;
93 | after(func: (index: any) => any);
94 |
95 | before(...content: any[]): CheerioSelector;
96 | before(func: (index: any) => any);
97 |
98 | remove(selector?: any): CheerioSelector;
99 |
100 | replaceWith(content: any): CheerioSelector;
101 |
102 | empty(): CheerioSelector;
103 |
104 | html(htmlString: string): CheerioSelector;
105 | html(): string;
106 |
107 | text(textString: string): CheerioSelector;
108 | text(): string;
109 |
110 | // Miscellaneous
111 | toArray(): any[];
112 |
113 | clone(): CheerioSelector;
114 | }
115 | }
--------------------------------------------------------------------------------
/colors.d.ts:
--------------------------------------------------------------------------------
1 | // https://github.com/Marak/colors.js
2 |
3 | // import _colors = module("colors");
4 | // var colors = require('colors');
5 |
6 | module "colors" {
7 | export function setTheme(theme: any);
8 | export function addSequencer(name: string, callback: Function);
9 |
10 | // none, browser, console
11 | export var mode: string;
12 | }
13 |
14 | declare interface String {
15 | bold: String;
16 | italic: String;
17 | underline: String;
18 | inverse: String;
19 | white: String;
20 | grey: String;
21 | black: String;
22 | blue: String;
23 | cyan: String;
24 | green: String;
25 | magenta: String;
26 | red: String;
27 | yellow: String;
28 | }
--------------------------------------------------------------------------------
/connect.d.ts:
--------------------------------------------------------------------------------
1 | declare module "connect" {
2 | export class Store {
3 | get(sid: string, cb: (err, data) => void ): void;
4 | set(sid: string, sess: any, cb: (err, data) => void ): void;
5 | destroy(sid: string, cb: (err, data) => void ): void;
6 | length(cb: (err, data) => void ): void;
7 | clear(cb: (err, data) => void ): void;
8 | }
9 | }
10 |
11 | declare module "express3" {
12 | export interface Request {
13 | session: any;
14 | }
15 | }
--------------------------------------------------------------------------------
/consolidate.d.ts:
--------------------------------------------------------------------------------
1 | ///
2 |
3 | declare module "consolidate" {
4 | export var clearCache:() => void;
5 | export var jade:(path:String, options: any, fn: any) => void;
6 | export var dust:(path:String, options: any, fn: any) => void;
7 | export var swig:(path:String, options: any, fn: any) => void;
8 | export var liquor:(path:String, options: any, fn: any) => void;
9 | export var ejs:(path:String, options: any, fn: any) => void;
10 | export var eco:(path:String, options: any, fn: any) => void;
11 | export var jazz:(path:String, options: any, fn: any) => void;
12 | export var jqtpl:(path:String, options: any, fn: any) => void;
13 | export var haml:(path:String, options: any, fn: any) => void;
14 | export var whiskers:(path:String, options: any, fn: any) => void;
15 | //export var 'haml-coffee':Function;
16 | export var hogan:(path:String, options: any, fn: any) => void;
17 | export var handlebars:(path:String, options: any, fn: any) => void;
18 | export var underscore:(path:String, options: any, fn: any) => void;
19 | export var qejs:(path:String, options: any, fn: any) => void;
20 | export var walrus:(path:String, options: any, fn: any) => void;
21 | export var mustache:(path:String, options: any, fn: any) => void;
22 | export var dot:(path:String, options: any, fn: any) => void;
23 | }
--------------------------------------------------------------------------------
/cron.d.ts:
--------------------------------------------------------------------------------
1 | module "cron" {
2 | class CronJob {
3 | constructor (cronTime: string, onTick: () => any, onComplete?: () => any,
4 | start?: bool, timezone?: string, context?: any);
5 | constructor (cronTime: Date, onTick: () => any, onComplete?: () => any,
6 | start?: bool, timezone?: string, context?: any);
7 |
8 | start();
9 | stop();
10 | }
11 | }
--------------------------------------------------------------------------------
/express-sessions.d.ts:
--------------------------------------------------------------------------------
1 | declare module "express3" {
2 | interface Request {
3 | session: any;
4 | }
5 | }
--------------------------------------------------------------------------------
/express-useragent.d.ts:
--------------------------------------------------------------------------------
1 | ///
2 | ///
3 |
4 | declare module "express3" {
5 | interface UserAgent {
6 | isMobile: boolean;
7 | isDesktop: boolean;
8 | Browser: string;
9 | Version: string;
10 | OS: string;
11 | Platform: string;
12 | source: string;
13 | }
14 |
15 | interface Request {
16 | useragent: UserAgent;
17 | }
18 | }
19 |
20 | declare module "express-useragent" {
21 | import express3 = require('express3');
22 |
23 | export function express(): (req: express3.Request, res: express3.Response, next?: Function) => void;
24 | }
--------------------------------------------------------------------------------
/express2.d.ts:
--------------------------------------------------------------------------------
1 | ///
2 |
3 | declare module "express" {
4 | export function createServer(): ExpressServer;
5 | export function static(path: string): any;
6 | import http = module("http");
7 | export var listen;
8 |
9 | // Connect middleware
10 | export function bodyParser(options?:any): (req: ExpressServerRequest, res: ExpressServerResponse, next) =>void;
11 | export function errorHandler(opts?:any): (req: ExpressServerRequest, res: ExpressServerResponse, next) =>void;
12 | export function methodOverride(): (req: ExpressServerRequest, res: ExpressServerResponse, next) =>void;
13 |
14 | export interface ExpressSettings {
15 | env?: string;
16 | views?: string;
17 | }
18 |
19 | export interface ExpressServer {
20 | set(name: string): any;
21 | set(name: string, val: any): any;
22 | enable(name: string): ExpressServer;
23 | disable(name: string): ExpressServer;
24 | enabled(name: string): bool;
25 | disabled(name: string): bool;
26 | configure(env: string, callback: () => void): ExpressServer;
27 | configure(env: string, env2: string, callback: () => void ): ExpressServer;
28 | configure(callback: () => void): ExpressServer;
29 | settings: ExpressSettings;
30 | engine(ext: string, callback: any): void;
31 | param(param: Function): ExpressServer;
32 | param(name: string, callback: Function): ExpressServer;
33 | param(name: string, expressParam: any): ExpressServer;
34 | param(name: any[], callback: Function): ExpressServer;
35 | get(name: string): any;
36 | get(path: string, handler: (req: ExpressServerRequest, res: ExpressServerResponse) => void ): void;
37 | get(path: RegExp, handler: (req: ExpressServerRequest, res: ExpressServerResponse) => void ): void;
38 | get(path: string, callbacks: any, callback: () => void ): void;
39 | post(path: string, handler: (req: ExpressServerRequest, res: ExpressServerResponse) => void ): void;
40 | post(path: RegExp, handler: (req: ExpressServerRequest, res: ExpressServerResponse) => void ): void;
41 | post(path: string, callbacks: any, callback: () => void ): void;
42 | all(path: string, callback: Function): void;
43 | all(path: string, callback: Function, callback2: Function): void;
44 | locals: any;
45 | render(view: string, callback: (err: Error, html) => void ): void;
46 | render(view: string, opts: any, callback: (err: Error, html) => void ): void;
47 | routes: any;
48 | listen(port: number, hostname: string, backlog: number, callback: Function): void;
49 | listen(port: number, callback: Function): void;
50 | listen(path: string, callback?: Function): void;
51 | listen(handle: any, listeningListener?: Function): void;
52 | use(route: string, callback: Function): ExpressServer;
53 | use(route: string, server: ExpressServer): ExpressServer;
54 | use(callback: Function): ExpressServer;
55 | use(server: ExpressServer): ExpressServer;
56 | }
57 |
58 | export interface ExpressServerRequest extends http.ServerRequest {
59 | params: any;
60 | query: any;
61 | body: any;
62 | files: any;
63 | param(name: string): any;
64 | route: any;
65 | cookies: any;
66 | signedCookies: any;
67 | get(field: string): string;
68 | accepts(types: string): any;
69 | accepts(types: string[]): any;
70 | accepted: any;
71 | is(type: string): bool;
72 | ip: string;
73 | ips: string[];
74 | path: string;
75 | host: string;
76 | fresh: bool;
77 | stale: bool;
78 | xhr: bool;
79 | protocol: string;
80 | secure: bool;
81 | subdomains: string[];
82 | acceptedLanguages: string[];
83 | acceptedCharsets: string[];
84 | acceptsCharset(charset: string): bool;
85 | acceptsLanguage(lang: string): bool;
86 | }
87 |
88 | export interface ExpressServerResponse extends http.ServerResponse {
89 | status(code: number): any;
90 | set(field: any): void;
91 | set(field: string, value: string): void;
92 | header(field: any): void;
93 | header(field: string, value: string): void;
94 | get(field: string): any;
95 | cookie(name: string, value: any, options?: any): void;
96 | clearcookie(name: string, options?: any): void;
97 | redirect(status: number, url: string): void;
98 | redirect(url: string): void;
99 | charset: string;
100 | send(bodyOrStatus: any);
101 | send(body: any, status: any);
102 | send(body: any, headers: any, status: number);
103 | json(bodyOrStatus: any);
104 | json(body: any, status: any);
105 | json(body: any, headers: any, status: number);
106 | jsonp(bodyOrStatus: any);
107 | jsonp(body: any, status: any);
108 | jsonp(body: any, headers: any, status: number);
109 | type(type: string): void;
110 | format(object: any): void;
111 | attachment(filename?: string);
112 | sendfile(path: string): void;
113 | sendfile(path: string, options: any): void;
114 | sendfile(path: string, options: any, fn: (err: Error) =>void ): void;
115 | download(path: string): void;
116 | download(path: string, filename: string): void;
117 | download(path: string, filename: string, fn: (err: Error) =>void ): void;
118 | links(links: any): void;
119 | locals: any;
120 | render(view: string, locals: any): void;
121 | render(view: string, callback: (err: Error, html: any) =>void ): void;
122 | render(view: string, locals: any, callback: (err: Error, html: any) =>void ): void;
123 | }
124 | }
125 |
--------------------------------------------------------------------------------
/express3-useragent.d.ts:
--------------------------------------------------------------------------------
1 | ///
2 | ///
3 |
4 | declare module "express3" {
5 | interface UserAgent {
6 | isMobile: bool;
7 | isDesktop: bool;
8 | Browser: string;
9 | Version: string;
10 | OS: string;
11 | Platform: string;
12 | source: string;
13 | }
14 |
15 | interface Request {
16 | useragent: UserAgent;
17 | }
18 | }
19 |
20 | declare module "express-useragent" {
21 | import express3 = module('express3');
22 |
23 | export function express(): (req: express3.Request, res: express3.Response, next?: Function) => void;
24 | }
--------------------------------------------------------------------------------
/express3.d.ts:
--------------------------------------------------------------------------------
1 | ///
2 |
3 | /*
4 |
5 | How to use:
6 |
7 | import express3 = require("express3");
8 | var express = require('express');
9 | var app:express3.Application = express();
10 |
11 | */
12 |
13 | declare module "express3" {
14 | import stream = require("stream");
15 | import http = require("http");
16 | //declare function callHack(): app;
17 |
18 | //export var app: Application;
19 |
20 | //export function (): Application;
21 |
22 | interface Application extends Function {
23 | // Constructor
24 | (): Application;
25 |
26 | set(name: String, value:any):any;
27 | get(name: String):any;
28 |
29 | enable(name: String):void;
30 | disable(name: String):void;
31 |
32 | enabled(name: String):boolean;
33 | disabled(name: String):boolean;
34 |
35 | configure(callback: () => void):void;
36 | configure(env: String, callback: () => void):void;
37 |
38 | engine(ext: String, callback:(path:String, options: any, callback: any) => void):void;
39 |
40 | param(callback: (req: Request, res: Response, next, id) => void);
41 | param(name: String, callback: (req: Request, res: Response, next, id) => void);
42 |
43 | get(path:String, ...callbacks: Function[] );
44 | post(path: String, ...callbacks: Function[]);
45 | put(path: String, ...callbacks: Function[]);
46 | delete(path: String, ...callbacks: Function[]);
47 | head(path: String, ...callbacks: Function[]);
48 | options(path:String, ...callbacks: Function[]);
49 | all(path:String, ...callbacks: Function[] );
50 |
51 | get(path:RegExp, ...callbacks: Function[] );
52 | post(path: RegExp, ...callbacks: Function[]);
53 | put(path: RegExp, ...callbacks: Function[]);
54 | delete(path: RegExp, ...callbacks: Function[]);
55 | head(path: RegExp, ...callbacks: Function[]);
56 | options(path:RegExp, ...callbacks: Function[]);
57 | all(path:RegExp, ...callbacks: Function[] );
58 |
59 | locals: any;
60 |
61 | render(view: String, options: any, callback: (err, html) => void);
62 |
63 | routes: any;
64 |
65 | listen(port: number, host?: string, callback?: Function):void;
66 | listen(socket: string, callback?: Function):void;
67 |
68 | router:(req: Request, res: Response, next: Function) => void;
69 |
70 | // More:
71 | use(item: (req: Request, res: Response, next: Function) => void): Application;
72 | use(path: string, item: (req: Request, res: Response, next: Function) => void): Application;
73 |
74 | // connect Middlewares:
75 | //static(path: String): (req: Request, res: Response, next?: Function) => void;
76 | //favicon(): (req: Request, res: Response, next?: Function) => void;
77 | }
78 |
79 | interface Request extends http.ServerRequest {
80 | params: any;
81 | query: any;
82 | body: any;
83 | files: any /**/;
84 |
85 | param(name: String): any;
86 | route: RequestRoute;
87 | cookies: any;
88 | signedCookies: any;
89 | get(name: String): any;
90 |
91 | accepts(type: String): void;
92 | accepts(type: String[]): void;
93 | accepted: RequestAccepted[];
94 |
95 | is(type: String): boolean;
96 | ip: String;
97 | ips: String[];
98 | path: String;
99 | host: String;
100 | fresh: boolean;
101 | stale: boolean;
102 | xhr: boolean;
103 | protocol: String;
104 | secure: boolean;
105 | subdomains: String[];
106 | acceptedLanguages: String[];
107 | acceptedCharsets: String[];
108 | acceptsCharset(charset: String): boolean;
109 | acceptsLanguage(lang: String): boolean;
110 | }
111 |
112 | interface RequestAccepted {
113 | value: String;
114 | quality: number;
115 | type: String;
116 | subtype: String;
117 | }
118 |
119 | interface RequestRoute {
120 | path: String;
121 | method: String;
122 | callbacks: Function[];
123 | keys: any;
124 | regexp: RegExp;
125 | params: any;
126 | }
127 |
128 | interface RequestFileBody {
129 | size?: number;
130 | path?: string;
131 | name?: string;
132 | type?: string;
133 | hash?: boolean;
134 | lastModifiedDate?: Date;
135 | _writeStream?: any;
136 | length?: number;
137 | filename?: string;
138 | mime?: string;
139 | }
140 |
141 | interface Response extends stream.WritableStream {
142 | app: Application;
143 |
144 | statusCode: number;
145 |
146 | status(code: number): Response;
147 |
148 | setHeader(key: string, value: any) : Response;
149 |
150 | set(field: Object): Response;
151 | set(field: String, value: String): Response;
152 |
153 | get(field: String): String;
154 |
155 | cookie(name: String, value: String, options?: ResponseCookieOptions): Response;
156 | clearCookie(name: String, options?: ResponseCookieOptions): Response;
157 |
158 | redirect(url: String): Response;
159 | redirect(status: number, url: String): Response;
160 |
161 | charset: String;
162 |
163 | send(body: any): Response;
164 | send(status: number, body?: any): Response;
165 |
166 | json(body: any): Response;
167 | json(status: number, body?: any): Response;
168 |
169 | jsonp(body: any): Response;
170 | jsonp(status: number, body?: any): Response;
171 |
172 | type(type: String): Response;
173 |
174 | format(object: Object): Response;
175 |
176 | attachment(filename?: String): Response;
177 |
178 | sendfile(path: String, options?: ResponseSendfileOptions, fn?: (err?) => void): Response;
179 | download(path: String, filename?: String, fn?: (err?) => void): Response;
180 | links(links: Object);
181 |
182 | locals: Object;
183 |
184 | render(view: String, callback: (err, html: String) => void);
185 | render(view: String, locals: Object, callback?: (err, html: String) => void);
186 |
187 | writeHead(code: number, options: any): void;
188 | }
189 |
190 | interface ResponseSendfileOptions {
191 | maxAge?: number;
192 | root?: string;
193 | }
194 |
195 | interface ResponseCookieOptions {
196 | domain?: String;
197 | path?: String;
198 | secure?: boolean;
199 | expires?: Date;
200 | maxAge?: number;
201 | httpOnly?: boolean;
202 | signed?: boolean;
203 | }
204 | }
205 |
--------------------------------------------------------------------------------
/fibers.d.ts:
--------------------------------------------------------------------------------
1 | declare module "fibers" {
2 | import fibers = module("fibers");
3 |
4 | export class Fiber {
5 | static yield(value:any): any;
6 | public run();
7 | }
8 |
9 | export var poolSize: number;
10 | export var fibersCreated: number;
11 | export var current: Fiber;
12 | export function yield(value:any): any;
13 | export function(callback: () => void): Fiber;
14 | }
--------------------------------------------------------------------------------
/form-data.d.ts:
--------------------------------------------------------------------------------
1 | // https://github.com/felixge/node-form-data
2 |
3 | declare module "form-data" {
4 | export class FormData {
5 | append(key: string, value: any, options?: any): FormData;
6 | getHeaders(): any;
7 | pipe(any): any;
8 | }
9 | }
10 |
--------------------------------------------------------------------------------
/fs-extra.d.ts:
--------------------------------------------------------------------------------
1 | ///
2 |
3 | declare module "fs-extra" {
4 | import stream = require("stream");
5 |
6 | export interface Stats {
7 | isFile(): boolean;
8 | isDirectory(): boolean;
9 | isBlockDevice(): boolean;
10 | isCharacterDevice(): boolean;
11 | isSymbolicLink(): boolean;
12 | isFIFO(): boolean;
13 | isSocket(): boolean;
14 | dev: number;
15 | ino: number;
16 | mode: number;
17 | nlink: number;
18 | uid: number;
19 | gid: number;
20 | rdev: number;
21 | size: number;
22 | blksize: number;
23 | blocks: number;
24 | atime: Date;
25 | mtime: Date;
26 | ctime: Date;
27 | }
28 |
29 | export interface FSWatcher {
30 | close(): void;
31 | }
32 |
33 | export class ReadStream extends stream.ReadableStream { }
34 | export class WriteStream extends stream.WritableStream { }
35 |
36 | //extended methods
37 | export function copy(src: string, dest: string, filter?, callback?: Function): void;
38 | export function createFile(file: string, callback?: Function): void;
39 | export function mkdirs(dir: string, callback?: Function): void;
40 | export function move(src: string, dest: string, filter?, callback?: Function): void;
41 | export function outputFile(file: string, data, callback?: Function): void;
42 | export function outputJson(file: string, data, callback?: Function): void;
43 | export function readJson(file, options?, callback?: Function): void;
44 | export function remove(dir: string, callback?: Function): void;
45 | export function writeJson(file: string, object, options?, callback?: Function): void;
46 |
47 | export function rename(oldPath: string, newPath: string, callback?: Function): void;
48 | export function renameSync(oldPath: string, newPath: string): void;
49 | export function truncate(fd: number, len: number, callback?: Function): void;
50 | export function truncateSync(fd: number, len: number): void;
51 | export function chown(path: string, uid: number, gid: number, callback?: Function): void;
52 | export function chownSync(path: string, uid: number, gid: number): void;
53 | export function fchown(fd: number, uid: number, gid: number, callback?: Function): void;
54 | export function fchownSync(fd: number, uid: number, gid: number): void;
55 | export function lchown(path: string, uid: number, gid: number, callback?: Function): void;
56 | export function lchownSync(path: string, uid: number, gid: number): void;
57 | export function chmod(path: string, mode: number, callback?: Function): void;
58 | export function chmod(path: string, mode: string, callback?: Function): void;
59 | export function chmodSync(path: string, mode: number): void;
60 | export function chmodSync(path: string, mode: string): void;
61 | export function fchmod(fd: number, mode: number, callback?: Function): void;
62 | export function fchmod(fd: number, mode: string, callback?: Function): void;
63 | export function fchmodSync(fd: number, mode: number): void;
64 | export function fchmodSync(fd: number, mode: string): void;
65 | export function lchmod(path: string, mode: string, callback?: Function): void;
66 | export function lchmod(path: string, mode: number, callback?: Function): void;
67 | export function lchmodSync(path: string, mode: number): void;
68 | export function lchmodSync(path: string, mode: string): void;
69 | export function stat(path: string, callback?: (err: Error, stats: Stats) => any): Stats;
70 | export function lstat(path: string, callback?: (err: Error, stats: Stats) => any): Stats;
71 | export function fstat(fd: number, callback?: (err: Error, stats: Stats) => any): Stats;
72 | export function statSync(path: string): Stats;
73 | export function lstatSync(path: string): Stats;
74 | export function fstatSync(fd: number): Stats;
75 | export function link(srcpath: string, dstpath: string, callback?: Function): void;
76 | export function linkSync(srcpath: string, dstpath: string): void;
77 | export function symlink(srcpath: string, dstpath: string, type?: string, callback?: Function): void;
78 | export function symlinkSync(srcpath: string, dstpath: string, type?: string): void;
79 | export function readlink(path: string, callback?: (err: Error, linkString: string) => any): void;
80 | export function realpath(path: string, callback?: (err: Error, resolvedPath: string) => any): void;
81 | export function realpath(path: string, cache: string, callback: (err: Error, resolvedPath: string) => any): void;
82 | export function realpathSync(path: string, cache?: boolean): string;
83 | export function unlink(path: string, callback?: Function): void;
84 | export function unlinkSync(path: string): void;
85 | export function rmdir(path: string, callback?: Function): void;
86 | export function rmdirSync(path: string): void;
87 | export function mkdir(path: string, mode?: number, callback?: Function): void;
88 | export function mkdir(path: string, mode?: string, callback?: Function): void;
89 | export function mkdirSync(path: string, mode?: number): void;
90 | export function mkdirSync(path: string, mode?: string): void;
91 | export function readdir(path: string, callback?: (err: Error, files: string[]) => void ): void;
92 | export function readdirSync(path: string): string[];
93 | export function close(fd: number, callback?: Function): void;
94 | export function closeSync(fd: number): void;
95 | export function open(path: string, flags: string, mode?: string, callback?: (err: Error, fd: number) => any): void;
96 | export function openSync(path: string, flags: string, mode?: string): number;
97 | export function utimes(path: string, atime: number, mtime: number, callback?: Function): void;
98 | export function utimesSync(path: string, atime: number, mtime: number): void;
99 | export function futimes(fd: number, atime: number, mtime: number, callback?: Function): void;
100 | export function futimesSync(fd: number, atime: number, mtime: number): void;
101 | export function fsync(fd: number, callback?: Function): void;
102 | export function fsyncSync(fd: number): void;
103 | export function write(fd: number, buffer: NodeBuffer, offset: number, length: number, position: number, callback?: (err: Error, written: number, buffer: NodeBuffer) => any): void;
104 | export function writeSync(fd: number, buffer: NodeBuffer, offset: number, length: number, position: number): number;
105 | export function read(fd: number, buffer: NodeBuffer, offset: number, length: number, position: number, callback?: (err: Error, bytesRead: number, buffer: NodeBuffer) => void ): void;
106 | export function readSync(fd: number, buffer: NodeBuffer, offset: number, length: number, position: number): number;
107 | export function readFile(filename: string, encoding: string, callback: (err: Error, data: string) => void ): void;
108 | export function readFile(filename: string, callback: (err: Error, data: NodeBuffer) => void ): void;
109 | export function readFileSync(filename: string): NodeBuffer;
110 | export function readFileSync(filename: string, encoding: string): string;
111 | export function writeFile(filename: string, data: any, encoding?: string, callback?: Function): void;
112 | export function writeFileSync(filename: string, data: any, encoding?: string): void;
113 | export function appendFile(filename: string, data: any, encoding?: string, callback?: Function): void;
114 | export function appendFileSync(filename: string, data: any, encoding?: string): void;
115 | export function watchFile(filename: string, listener: { curr: Stats; prev: Stats; }): void;
116 | export function watchFile(filename: string, options: { persistent?: boolean; interval?: number; }, listener: { curr: Stats; prev: Stats; }): void;
117 | export function unwatchFile(filename: string, listener?: Stats): void;
118 | export function watch(filename: string, options?: { persistent?: boolean; }, listener?: (event: string, filename: string) => any): FSWatcher;
119 | export function exists(path: string, callback?: (exists: boolean) => void ): void;
120 | export function existsSync(path: string): boolean;
121 | export function createReadStream(path: string, options?: {
122 | flags?: string;
123 | encoding?: string;
124 | fd?: string;
125 | mode?: number;
126 | bufferSize?: number;
127 | }): ReadStream;
128 | export function createWriteStream(path: string, options?: {
129 | flags?: string;
130 | encoding?: string;
131 | string?: string;
132 | }): WriteStream;
133 | }
134 |
--------------------------------------------------------------------------------
/gently.d.ts:
--------------------------------------------------------------------------------
1 | // Usage: In typescript you must use seperate statements for importing and creating the class:
2 | // import Gently = require('gently');
3 | // var gently: Gently = new Gently();
4 |
5 |
6 | declare module "gently" {
7 | export = Gently;
8 |
9 | class Gently {
10 | constructor();
11 | hijacked: any[];
12 |
13 | expect(obj: any, method: string, stubFn?: (...args: any[]) => any): (...args: any[]) => any;
14 | expect(obj: any, method: string, count: number, stubFn: (...args: any[]) => any): (...args: any[]) => any;
15 |
16 | restore(obj: any, method: string): void;
17 |
18 | hijack(realRequire: (id: string) => any): (id: string) => any;
19 |
20 | stub(location: string, exportsName?: string): any;
21 |
22 | verify(msg?: string): void;
23 | }
24 | }
--------------------------------------------------------------------------------
/glob.d.ts:
--------------------------------------------------------------------------------
1 | // glob updated: 3.1.14
2 | // https://github.com/isaacs/node-glob
3 |
4 | declare module "glob" {
5 | import glob = module("glob");
6 |
7 | export function(pattern: string, callback: (err: Error, files: string[]) => void);
8 | export function(pattern: string, options: Options, callback: (err: Error, files: string[]) => void);
9 |
10 | export function sync(pattern: string, options?: Options) : string[];
11 |
12 | export interface Glob extends EventEmitter {
13 | // event: end
14 | // event: match
15 | // event: error
16 | // event: abort
17 |
18 | constructor (pattern: string, callback: (err: Error, files: string[]) => void);
19 | constructor (pattern: string, options: Options, callback: (err: Error, files: string[]) => void);
20 |
21 | abort();
22 |
23 | minimatch: any;
24 | options: Options;
25 | error: Error;
26 | aborted: bool;
27 | }
28 |
29 | export interface Options {
30 | cwd?: string;
31 | root?: string;
32 | nomount?: bool;
33 | mark?: string;
34 | nosort?: bool;
35 | stat?: bool;
36 | silent?: bool;
37 | strict?: bool;
38 | statCache?;
39 | sync?: bool;
40 | nounique?: bool;
41 | nonull?: bool;
42 | nocase?: bool;
43 | debug?: bool;
44 | globDebug?: bool;
45 | }
46 | }
--------------------------------------------------------------------------------
/imagemagick.d.ts:
--------------------------------------------------------------------------------
1 | ///
2 |
3 | declare module "imagemagick" {
4 | import child_process = require("child_process");
5 |
6 | interface _identify {
7 | (path: string, callback: (err: Error, features: Features) => void): child_process.ChildProcess;
8 | (path: any[], callback: (err: Error, result: string) => void): child_process.ChildProcess;
9 | path: string;
10 | }
11 |
12 | export var identify: _identify;
13 |
14 | export function readMetadata(path: string, callback: (err: Error, result: any) => void): child_process.ChildProcess;
15 |
16 | interface _convert {
17 | (args: any, callback: (err, result) => void): child_process.ChildProcess;
18 | (args: any, timeout: number, callback: (err, result) => void): child_process.ChildProcess;
19 | path: string;
20 | }
21 |
22 | export var convert:_convert;
23 |
24 | export function resize(options : Options, callback: (err, result) => void): child_process.ChildProcess;
25 | export function crop(options : Options, callback: (err, result) => void): child_process.ChildProcess;
26 | export function resizeArgs(options: Options) : ResizeArgs;
27 |
28 | export interface Features {
29 | format?: string;
30 | width?: string;
31 | height?: string;
32 | depth?: string;
33 | }
34 |
35 | export interface Options {
36 | srcPath?: string;//: null,
37 | srcData?: string;//: null,
38 | srcFormat?: string;//: null,
39 | dstPath?: string;//: null,
40 | quality?: number;//: 0.8,
41 | format?: string;//: 'jpg',
42 | progressive?: boolean;//: false,
43 | colorspace?;//: null,
44 | width?: number;//: 0,
45 | height?: number;//: 0,
46 | strip?: boolean;//: true,
47 | filter?: string;//: 'Lagrange',
48 | sharpening?: number;//: 0.2,
49 | customArgs?: any[];//: [],
50 | timeout?: number;//: 0
51 | }
52 |
53 | export interface ResizeArgs {
54 | opt: Options;
55 | args: string[];
56 | }
57 | }
--------------------------------------------------------------------------------
/jquery.d.ts:
--------------------------------------------------------------------------------
1 | /* *****************************************************************************
2 | Copyright (c) Microsoft Corporation. All rights reserved.
3 | Licensed under the Apache License, Version 2.0 (the "License"); you may not use
4 | this file except in compliance with the License. You may obtain a copy of the
5 | License at http://www.apache.org/licenses/LICENSE-2.0
6 |
7 | THIS CODE IS PROVIDED *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
8 | KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
9 | WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
10 | MERCHANTABLITY OR NON-INFRINGEMENT.
11 |
12 | See the Apache Version 2.0 License for specific language governing permissions
13 | and limitations under the License.
14 | ***************************************************************************** */
15 |
16 | // Typing for the jQuery library, version 1.9.x
17 |
18 | /*
19 | Interface for the AJAX setting that will configure the AJAX request
20 | */
21 | interface JQueryAjaxSettings {
22 | accepts?: any;
23 | async?: boolean;
24 | beforeSend?(jqXHR: JQueryXHR, settings: JQueryAjaxSettings);
25 | cache?: boolean;
26 | complete?(jqXHR: JQueryXHR, textStatus: string);
27 | contents?: { [key: string]: any; };
28 | contentType?: string;
29 | context?: any;
30 | converters?: { [key: string]: any; };
31 | crossDomain?: boolean;
32 | data?: any;
33 | dataFilter?(data: any, ty: any): any;
34 | dataType?: string;
35 | error?(jqXHR: JQueryXHR, textStatus: string, errorThrow: string): any;
36 | global?: boolean;
37 | headers?: { [key: string]: any; };
38 | ifModified?: boolean;
39 | isLocal?: boolean;
40 | jsonp?: string;
41 | jsonpCallback?: any;
42 | mimeType?: string;
43 | password?: string;
44 | processData?: boolean;
45 | scriptCharset?: string;
46 | statusCode?: { [key: string]: any; };
47 | success?(data: any, textStatus: string, jqXHR: JQueryXHR);
48 | timeout?: number;
49 | traditional?: boolean;
50 | type?: string;
51 | url?: string;
52 | username?: string;
53 | xhr?: any;
54 | xhrFields?: { [key: string]: any; };
55 | }
56 |
57 | /*
58 | Interface for the jqXHR object
59 | */
60 | interface JQueryXHR extends XMLHttpRequest, JQueryPromise {
61 | overrideMimeType(mimeType: string);
62 | abort(statusText?: string): void;
63 | }
64 |
65 | /*
66 | Interface for the JQuery callback
67 | */
68 | interface JQueryCallback {
69 | add(...callbacks: any[]): any;
70 | disable(): any;
71 | empty(): any;
72 | fire(...arguments: any[]): any;
73 | fired(): boolean;
74 | fireWith(context: any, ...args: any[]): any;
75 | has(callback: any): boolean;
76 | lock(): any;
77 | locked(): boolean;
78 | remove(...callbacks: any[]): any;
79 | }
80 |
81 | /*
82 | Interface for the JQuery promise, part of callbacks
83 | */
84 | interface JQueryPromise {
85 | always(...alwaysCallbacks: any[]): JQueryPromise;
86 | done(...doneCallbacks: any[]): JQueryPromise;
87 | fail(...failCallbacks: any[]): JQueryPromise;
88 | progress(...progressCallbacks: any[]): JQueryPromise;
89 | state(): string;
90 | pipe(doneFilter?: (x: any) => any, failFilter?: (x: any) => any, progressFilter?: (x: any) => any): JQueryPromise;
91 | then(doneCallbacks: any, failCallbacks?: any, progressCallbacks?: any): JQueryPromise;
92 | }
93 |
94 | /*
95 | Interface for the JQuery deferred, part of callbacks
96 | */
97 | interface JQueryDeferred extends JQueryPromise {
98 | notify(...args: any[]): JQueryDeferred;
99 | notifyWith(context: any, ...args: any[]): JQueryDeferred;
100 |
101 | promise(target? ): JQueryPromise;
102 | reject(...args: any[]): JQueryDeferred;
103 | rejectWith(context:any, ...args: any[]): JQueryDeferred;
104 | resolve(...args: any[]): JQueryDeferred;
105 | resolveWith(context:any, ...args: any[]): JQueryDeferred;
106 | }
107 |
108 | /*
109 | Interface of the JQuery extension of the W3C event object
110 | */
111 |
112 | interface BaseJQueryEventObject extends Event {
113 | data: any;
114 | delegateTarget: Element;
115 | isDefaultPrevented(): boolean;
116 | isImmediatePropogationStopped(): boolean;
117 | isPropogationStopped(): boolean;
118 | namespace: string;
119 | preventDefault(): any;
120 | relatedTarget: Element;
121 | result: any;
122 | stopImmediatePropagation();
123 | stopPropagation();
124 | pageX: number;
125 | pageY: number;
126 | which: number;
127 | metaKey: any;
128 | }
129 |
130 | interface JQueryInputEventObject extends BaseJQueryEventObject
131 | {
132 | altKey: boolean;
133 | ctrlKey: boolean;
134 | metaKey: boolean;
135 | shiftKey: boolean;
136 | }
137 |
138 | interface JQueryMouseEventObject extends JQueryInputEventObject
139 | {
140 | button: number;
141 | clientX: number;
142 | clientY: number;
143 | offsetX: number;
144 | offsetY: number;
145 | pageX: number;
146 | pageY: number;
147 | screenX: number;
148 | screenY: number;
149 | }
150 |
151 | interface JQueryKeyEventObject extends JQueryInputEventObject
152 | {
153 | char: any;
154 | charCode: number;
155 | key: any;
156 | keyCode: number;
157 | }
158 |
159 | interface JQueryEventObject extends BaseJQueryEventObject, JQueryInputEventObject, JQueryMouseEventObject, JQueryKeyEventObject {
160 | }
161 |
162 | /*
163 | Collection of properties of the current browser
164 | */
165 |
166 | interface JQuerySupport {
167 | ajax?: boolean;
168 | boxModel?: boolean;
169 | changeBubbles?: boolean;
170 | checkClone?: boolean;
171 | checkOn?: boolean;
172 | cors?: boolean;
173 | cssFloat?: boolean;
174 | hrefNormalized?: boolean;
175 | htmlSerialize?: boolean;
176 | leadingWhitespace?: boolean;
177 | noCloneChecked?: boolean;
178 | noCloneEvent?: boolean;
179 | opacity?: boolean;
180 | optDisabled?: boolean;
181 | optSelected?: boolean;
182 | scriptEval?(): boolean;
183 | style?: boolean;
184 | submitBubbles?: boolean;
185 | tbody?: boolean;
186 | }
187 |
188 | interface JQueryParam {
189 | (obj: any): string;
190 | (obj: any, traditional: boolean): string;
191 | }
192 |
193 | /*
194 | Static members of jQuery (those on $ and jQuery themselves)
195 | */
196 | interface JQueryStatic {
197 |
198 | /****
199 | AJAX
200 | *****/
201 | ajax(settings: JQueryAjaxSettings): JQueryXHR;
202 | ajax(url: string, settings?: JQueryAjaxSettings): JQueryXHR;
203 |
204 | ajaxPrefilter(dataTypes: string, handler: (opts: any, originalOpts: any, jqXHR: JQueryXHR) => any): any;
205 | ajaxPrefilter(handler: (opts: any, originalOpts: any, jqXHR: JQueryXHR) => any): any;
206 |
207 | ajaxSettings: JQueryAjaxSettings;
208 |
209 | ajaxSetup();
210 | ajaxSetup(options: JQueryAjaxSettings);
211 |
212 | get(url: string, data?: any, success?: any, dataType?: any): JQueryXHR;
213 | getJSON(url: string, data?: any, success?: any): JQueryXHR;
214 | getScript(url: string, success?: any): JQueryXHR;
215 |
216 | param: JQueryParam;
217 |
218 | post(url: string, data?: any, success?: any, dataType?: any): JQueryXHR;
219 |
220 | /*********
221 | CALLBACKS
222 | **********/
223 | Callbacks(flags?: string): JQueryCallback;
224 |
225 | /****
226 | CORE
227 | *****/
228 | holdReady(hold: boolean): any;
229 |
230 | (selector: string, context?: any): JQuery;
231 | (element: Element): JQuery;
232 | (object: { }): JQuery;
233 | (elementArray: Element[]): JQuery;
234 | (object: JQuery): JQuery;
235 | (func: Function): JQuery;
236 | (array: any[]): JQuery;
237 | (): JQuery;
238 |
239 | noConflict(removeAll?: boolean): Object;
240 |
241 | when(...deferreds: any[]): JQueryPromise;
242 |
243 | /***
244 | CSS
245 | ****/
246 | css(e: any, propertyName: string, value?: any);
247 | css(e: any, propertyName: any, value?: any);
248 | cssHooks: { [key: string]: any; };
249 | cssNumber: any;
250 |
251 | /****
252 | DATA
253 | *****/
254 | data(element: Element, key: string, value: any): any;
255 | data(element: Element, key: string): any;
256 | data(element: Element): any;
257 |
258 | dequeue(element: Element, queueName?: string): any;
259 |
260 | hasData(element: Element): boolean;
261 |
262 | queue(element: Element, queueName?: string): any[];
263 | queue(element: Element, queueName: string, newQueueOrCallback: any): JQuery;
264 |
265 | removeData(element: Element, name?: string): JQuery;
266 |
267 | /*******
268 | EFFECTS
269 | ********/
270 | fx: { tick: () => void; interval: number; stop: () => void; speeds: { slow: number; fast: number; }; off: boolean; step: any; };
271 |
272 | /******
273 | EVENTS
274 | *******/
275 | proxy(fn : (...args: any[]) => any, context: any, ...args: any[]): any;
276 | proxy(context: any, name: string, ...args: any[]): any;
277 | Deferred: {
278 | (fn?: (d: JQueryDeferred) => any): JQueryDeferred;
279 | new(fn?: (d: JQueryDeferred) => any): JQueryDeferred;
280 | };
281 | Event(name:string, eventProperties?:any): JQueryEventObject;
282 |
283 | /*********
284 | INTERNALS
285 | **********/
286 | error(message: any);
287 |
288 | /*************
289 | MISCELLANEOUS
290 | **************/
291 | expr: any;
292 | fn: any; //TODO: Decide how we want to type this
293 | isReady: boolean;
294 |
295 | /**********
296 | PROPERTIES
297 | ***********/
298 | support: JQuerySupport;
299 |
300 | /*********
301 | UTILITIES
302 | **********/
303 | contains(container: Element, contained: Element): boolean;
304 |
305 | each(collection: any, callback: (indexInArray: any, valueOfElement: any) => any): any;
306 | each(collection: any[], callback: (indexInArray: any, valueOfElement: any) => any): any;
307 | each(collection: JQuery, callback: (indexInArray: number, valueOfElement: HTMLElement) => any): any;
308 | each(collection: string[], callback: (indexInArray: number, valueOfElement: string) => any): any;
309 | each(collection: number[], callback: (indexInArray: number, valueOfElement: number) => any): any;
310 |
311 | extend(target: any, ...objs: any[]): Object;
312 | extend(deep: boolean, target: any, ...objs: any[]): Object;
313 |
314 | globalEval(code: string): any;
315 |
316 | grep(array: any[], func: any, invert?: boolean): any[];
317 |
318 | inArray(value: any, array: any[], fromIndex?: number): number;
319 |
320 | isArray(obj: any): boolean;
321 | isEmptyObject(obj: any): boolean;
322 | isFunction(obj: any): boolean;
323 | isNumeric(value: any): boolean;
324 | isPlainObject(obj: any): boolean;
325 | isWindow(obj: any): boolean;
326 | isXMLDoc(node: Node): boolean;
327 |
328 | makeArray(obj: any): any[];
329 |
330 | map(array: any[], callback: (elementOfArray: any, indexInArray: any) =>any): any[];
331 | map(array: any, callback: (elementOfArray: any, indexInArray: any) =>any): any;
332 |
333 | merge(first: any[], second: any[]): any[];
334 |
335 | noop(): any;
336 |
337 | now(): number;
338 |
339 | parseJSON(json: string): Object;
340 |
341 | //FIXME: This should return an XMLDocument
342 | parseXML(data: string): any;
343 |
344 | queue(element: Element, queueName: string, newQueue: any[]): JQuery;
345 |
346 | trim(str: string): string;
347 |
348 | type(obj: any): string;
349 |
350 | unique(arr: any[]): any[];
351 | }
352 |
353 | /*
354 | The jQuery instance members
355 | */
356 | interface JQuery {
357 | /****
358 | AJAX
359 | *****/
360 | ajaxComplete(handler: any): JQuery;
361 | ajaxError(handler: (event: any, jqXHR: any, settings: any, exception: any) => any): JQuery;
362 | ajaxSend(handler: (event: any, jqXHR: any, settings: any, exception: any) => any): JQuery;
363 | ajaxStart(handler: () => any): JQuery;
364 | ajaxStop(handler: () => any): JQuery;
365 | ajaxSuccess(handler: (event: any, jqXHR: any, settings: any, exception: any) => any): JQuery;
366 |
367 | load(url: string, data?: any, complete?: any): JQuery;
368 |
369 | serialize(): string;
370 | serializeArray(): any[];
371 |
372 | /**********
373 | ATTRIBUTES
374 | ***********/
375 | addClass(classNames: string): JQuery;
376 | addClass(func: (index: any, currentClass: any) => string): JQuery;
377 |
378 | // http://api.jquery.com/addBack/
379 | addBack(selector?: string): JQuery;
380 |
381 |
382 | attr(attributeName: string): string;
383 | attr(attributeName: string, value: any): JQuery;
384 | attr(map: { [key: string]: any; }): JQuery;
385 | attr(attributeName: string, func: (index: any, attr: any) => any): JQuery;
386 |
387 | hasClass(className: string): boolean;
388 |
389 | html(): string;
390 | html(htmlString: string): JQuery;
391 | html(htmlContent: (index: number, oldhtml: string) => string): JQuery;
392 |
393 | prop(propertyName: string): any;
394 | prop(propertyName: string, value: any): JQuery;
395 | prop(map: any): JQuery;
396 | prop(propertyName: string, func: (index: any, oldPropertyValue: any) => any): JQuery;
397 |
398 | removeAttr(attributeName: any): JQuery;
399 |
400 | removeClass(className?: any): JQuery;
401 | removeClass(func: (index: any, cls: any) => any): JQuery;
402 |
403 | removeProp(propertyName: any): JQuery;
404 |
405 | toggleClass(className: any, swtch?: boolean): JQuery;
406 | toggleClass(swtch?: boolean): JQuery;
407 | toggleClass(func: (index: any, cls: any, swtch: any) => any): JQuery;
408 |
409 | val(): any;
410 | val(value: string[]): JQuery;
411 | val(value: string): JQuery;
412 | val(value: number): JQuery;
413 | val(func: (index: any, value: any) => any): JQuery;
414 |
415 | /***
416 | CSS
417 | ****/
418 | css(propertyName: string): string;
419 | css(propertyNames: string[]): string;
420 | css(properties: any): JQuery;
421 | css(propertyName: string, value: any): JQuery;
422 | css(propertyName: any, value: any): JQuery;
423 |
424 | height(): number;
425 | height(value: number): JQuery;
426 | height(value: string): JQuery;
427 | height(func: (index: any, height: any) => any): JQuery;
428 |
429 | innerHeight(): number;
430 | innerWidth(): number;
431 |
432 | offset(): { left: number; top: number; };
433 | offset(coordinates: any): JQuery;
434 | offset(func: (index: any, coords: any) => any): JQuery;
435 |
436 | outerHeight(includeMargin?: boolean): number;
437 | outerWidth(includeMargin?: boolean): number;
438 |
439 | position(): { top: number; left: number; };
440 |
441 | scrollLeft(): number;
442 | scrollLeft(value: number): JQuery;
443 |
444 | scrollTop(): number;
445 | scrollTop(value: number): JQuery;
446 |
447 | width(): number;
448 | width(value: number): JQuery;
449 | width(value: string): JQuery;
450 | width(func: (index: any, height: any) => any): JQuery;
451 |
452 | /****
453 | DATA
454 | *****/
455 | clearQueue(queueName?: string): JQuery;
456 |
457 | data(key: string, value: any): JQuery;
458 | data(obj: { [key: string]: any; }): JQuery;
459 | data(key?: string): any;
460 |
461 | dequeue(queueName?: string): JQuery;
462 |
463 | removeData(nameOrList?: any): JQuery;
464 |
465 | /********
466 | DEFERRED
467 | *********/
468 | promise(type?: any, target?: any): JQueryPromise;
469 |
470 | /*******
471 | EFFECTS
472 | ********/
473 | animate(properties: any, duration?: any, complete?: Function): JQuery;
474 | animate(properties: any, duration?: any, easing?: string, complete?: Function): JQuery;
475 | animate(properties: any, options: { duration?: any; easing?: string; complete?: Function; step?: Function; queue?: boolean; specialEasing?: any; });
476 |
477 | delay(duration: number, queueName?: string): JQuery;
478 |
479 | fadeIn(duration?: any, callback?: any): JQuery;
480 | fadeIn(duration?: any, easing?: string, callback?: any): JQuery;
481 |
482 | fadeOut(duration?: any, callback?: any): JQuery;
483 | fadeOut(duration?: any, easing?: string, callback?: any): JQuery;
484 |
485 | fadeTo(duration: any, opacity: number, callback?: any): JQuery;
486 | fadeTo(duration: any, opacity: number, easing?: string, callback?: any): JQuery;
487 |
488 | fadeToggle(duration?: any, callback?: any): JQuery;
489 | fadeToggle(duration?: any, easing?: string, callback?: any): JQuery;
490 |
491 | finish(): JQuery;
492 |
493 | hide(duration?: any, callback?: any): JQuery;
494 | hide(duration?: any, easing?: string, callback?: any): JQuery;
495 |
496 | show(duration?: any, callback?: any): JQuery;
497 | show(duration?: any, easing?: string, callback?: any): JQuery;
498 |
499 | slideDown(duration?: any, callback?: any): JQuery;
500 | slideDown(duration?: any, easing?: string, callback?: any): JQuery;
501 |
502 | slideToggle(duration?: any, callback?: any): JQuery;
503 | slideToggle(duration?: any, easing?: string, callback?: any): JQuery;
504 |
505 | slideUp(duration?: any, callback?: any): JQuery;
506 | slideUp(duration?: any, easing?: string, callback?: any): JQuery;
507 |
508 | stop(clearQueue?: boolean, jumpToEnd?: boolean): JQuery;
509 | stop(queue?:any, clearQueue?: boolean, jumpToEnd?: boolean): JQuery;
510 |
511 | toggle(duration?: any, callback?: any): JQuery;
512 | toggle(duration?: any, easing?: string, callback?: any): JQuery;
513 | toggle(showOrHide: boolean): JQuery;
514 |
515 | /******
516 | EVENTS
517 | *******/
518 | bind(eventType: string, eventData?: any, handler?: (eventObject: JQueryEventObject) => any): JQuery;
519 | bind(eventType: string, eventData: any, preventBubble:boolean): JQuery;
520 | bind(eventType: string, preventBubble:boolean): JQuery;
521 | bind(...events: any[]);
522 |
523 | blur(eventData?: any, handler?: (eventObject: JQueryEventObject) => any): JQuery;
524 | blur(handler: (eventObject: JQueryEventObject) => any): JQuery;
525 |
526 | change(eventData?: any, handler?: (eventObject: JQueryEventObject) => any): JQuery;
527 | change(handler: (eventObject: JQueryEventObject) => any): JQuery;
528 |
529 | click(eventData?: any, handler?: (eventObject: JQueryEventObject) => any): JQuery;
530 | click(handler: (eventObject: JQueryEventObject) => any): JQuery;
531 |
532 | dblclick(eventData?: any, handler?: (eventObject: JQueryEventObject) => any): JQuery;
533 | dblclick(handler: (eventObject: JQueryEventObject) => any): JQuery;
534 |
535 | delegate(selector: any, eventType: string, handler: (eventObject: JQueryEventObject) => any): JQuery;
536 |
537 | focus(eventData?: any, handler?: (eventObject: JQueryEventObject) => any): JQuery;
538 | focus(handler: (eventObject: JQueryEventObject) => any): JQuery;
539 |
540 | focusin(eventData: any, handler: (eventObject: JQueryEventObject) => any): JQuery;
541 | focusin(handler: (eventObject: JQueryEventObject) => any): JQuery;
542 |
543 | focusout(eventData: any, handler: (eventObject: JQueryEventObject) => any): JQuery;
544 | focusout(handler: (eventObject: JQueryEventObject) => any): JQuery;
545 |
546 | hover(handlerIn: (eventObject: JQueryEventObject) => any, handlerOut: (eventObject: JQueryEventObject) => any): JQuery;
547 | hover(handlerInOut: (eventObject: JQueryEventObject) => any): JQuery;
548 |
549 | keydown(eventData?: any, handler?: (eventObject: JQueryKeyEventObject) => any): JQuery;
550 | keydown(handler: (eventObject: JQueryKeyEventObject) => any): JQuery;
551 |
552 | keypress(eventData?: any, handler?: (eventObject: JQueryKeyEventObject) => any): JQuery;
553 | keypress(handler: (eventObject: JQueryKeyEventObject) => any): JQuery;
554 |
555 | keyup(eventData?: any, handler?: (eventObject: JQueryKeyEventObject) => any): JQuery;
556 | keyup(handler: (eventObject: JQueryKeyEventObject) => any): JQuery;
557 |
558 | load(eventData?: any, handler?: (eventObject: JQueryEventObject) => any): JQuery;
559 | load(handler: (eventObject: JQueryEventObject) => any): JQuery;
560 |
561 | mousedown(): JQuery;
562 | mousedown(eventData: any, handler: (eventObject: JQueryMouseEventObject) => any): JQuery;
563 | mousedown(handler: (eventObject: JQueryMouseEventObject) => any): JQuery;
564 |
565 | mouseevent(eventData: any, handler: (eventObject: JQueryMouseEventObject) => any): JQuery;
566 | mouseevent(handler: (eventObject: JQueryMouseEventObject) => any): JQuery;
567 |
568 | mouseenter(): JQuery;
569 | mouseenter(eventData: any, handler: (eventObject: JQueryMouseEventObject) => any): JQuery;
570 | mouseenter(handler: (eventObject: JQueryMouseEventObject) => any): JQuery;
571 |
572 | mouseleave(): JQuery;
573 | mouseleave(eventData: any, handler: (eventObject: JQueryMouseEventObject) => any): JQuery;
574 | mouseleave(handler: (eventObject: JQueryMouseEventObject) => any): JQuery;
575 |
576 | mousemove(): JQuery;
577 | mousemove(eventData: any, handler: (eventObject: JQueryMouseEventObject) => any): JQuery;
578 | mousemove(handler: (eventObject: JQueryMouseEventObject) => any): JQuery;
579 |
580 | mouseout(): JQuery;
581 | mouseout(eventData: any, handler: (eventObject: JQueryMouseEventObject) => any): JQuery;
582 | mouseout(handler: (eventObject: JQueryMouseEventObject) => any): JQuery;
583 |
584 | mouseover(): JQuery;
585 | mouseover(eventData: any, handler: (eventObject: JQueryMouseEventObject) => any): JQuery;
586 | mouseover(handler: (eventObject: JQueryMouseEventObject) => any): JQuery;
587 |
588 | mouseup(): JQuery;
589 | mouseup(eventData: any, handler: (eventObject: JQueryMouseEventObject) => any): JQuery;
590 | mouseup(handler: (eventObject: JQueryMouseEventObject) => any): JQuery;
591 |
592 | off(events?: string, selector?: any, handler?: (eventObject: JQueryEventObject) => any): JQuery;
593 | off(eventsMap: { [key: string]: any; }, selector?: any): JQuery;
594 |
595 | on(events: string, selector?: any, data?: any, handler?: (eventObject: JQueryEventObject) => any): JQuery;
596 | on(events: string, selector?: any, handler?: (eventObject: JQueryEventObject) => any): JQuery;
597 | on(eventsMap: { [key: string]: any; }, selector?: any, data?: any): JQuery;
598 |
599 | one(events: string, selector?: any, data?: any, handler?: (eventObject: JQueryEventObject) => any): JQuery;
600 | one(eventsMap: { [key: string]: any; }, selector?: any, data?: any): JQuery;
601 |
602 | ready(handler: any): JQuery;
603 |
604 | resize(eventData?: any, handler?: (eventObject: JQueryEventObject) => any): JQuery;
605 | resize(handler: (eventObject: JQueryEventObject) => any): JQuery;
606 |
607 | scroll(eventData?: any, handler?: (eventObject: JQueryEventObject) => any): JQuery;
608 | scroll(handler: (eventObject: JQueryEventObject) => any): JQuery;
609 |
610 | select(eventData?: any, handler?: (eventObject: JQueryEventObject) => any): JQuery;
611 | select(handler: (eventObject: JQueryEventObject) => any): JQuery;
612 |
613 | submit(eventData?: any, handler?: (eventObject: JQueryEventObject) => any): JQuery;
614 | submit(handler: (eventObject: JQueryEventObject) => any): JQuery;
615 |
616 | trigger(eventType: string, ...extraParameters: any[]): JQuery;
617 | trigger(event: JQueryEventObject): JQuery;
618 |
619 | triggerHandler(eventType: string, ...extraParameters: any[]): Object;
620 |
621 | unbind(eventType?: string, handler?: (eventObject: JQueryEventObject) => any): JQuery;
622 | unbind(eventType: string, fls: boolean): JQuery;
623 | unbind(evt: any): JQuery;
624 |
625 | undelegate(): JQuery;
626 | undelegate(selector: any, eventType: string, handler?: (eventObject: JQueryEventObject) => any): JQuery;
627 | undelegate(selector: any, events: any): JQuery;
628 | undelegate(namespace: string): JQuery;
629 |
630 | unload(eventData?: any, handler?: (eventObject: JQueryEventObject) => any): JQuery;
631 | unload(handler: (eventObject: JQueryEventObject) => any): JQuery;
632 |
633 | /*********
634 | INTERNALS
635 | **********/
636 |
637 | context: Element;
638 | jquery: string;
639 |
640 | error(handler: (eventObject: JQueryEventObject) => any): JQuery;
641 | error(eventData: any, handler: (eventObject: JQueryEventObject) => any): JQuery;
642 |
643 | pushStack(elements: any[]): JQuery;
644 | pushStack(elements: any[], name: any, arguments: any): JQuery;
645 |
646 | /************
647 | MANIPULATION
648 | *************/
649 | after(...content: any[]): JQuery;
650 | after(func: (index: any) => any);
651 |
652 | append(...content: any[]): JQuery;
653 | append(func: (index: any, html: any) => any);
654 |
655 | appendTo(target: any): JQuery;
656 |
657 | before(...content: any[]): JQuery;
658 | before(func: (index: any) => any);
659 |
660 | clone(withDataAndEvents?: boolean, deepWithDataAndEvents?: boolean): JQuery;
661 |
662 | detach(selector?: any): JQuery;
663 |
664 | empty(): JQuery;
665 |
666 | insertAfter(target: any): JQuery;
667 | insertBefore(target: any): JQuery;
668 |
669 | prepend(...content: any[]): JQuery;
670 | prepend(func: (index: any, html: any) =>any): JQuery;
671 |
672 | prependTo(target: any): JQuery;
673 |
674 | remove(selector?: any): JQuery;
675 |
676 | replaceAll(target: any): JQuery;
677 |
678 | replaceWith(func: any): JQuery;
679 |
680 | text(): string;
681 | text(textString: any): JQuery;
682 | text(textString: (index: number, text: string) => string): JQuery;
683 |
684 | toArray(): any[];
685 |
686 | unwrap(): JQuery;
687 |
688 | wrap(wrappingElement: any): JQuery;
689 | wrap(func: (index: any) =>any): JQuery;
690 |
691 | wrapAll(wrappingElement: any): JQuery;
692 |
693 | wrapInner(wrappingElement: any): JQuery;
694 | wrapInner(func: (index: any) =>any): JQuery;
695 |
696 | /*************
697 | MISCELLANEOUS
698 | **************/
699 | each(func: (index: any, elem: Element) => any): JQuery;
700 |
701 | get(index?: number): any;
702 |
703 | index(): number;
704 | index(selector: string): number;
705 | index(element: any): number;
706 |
707 | /**********
708 | PROPERTIES
709 | ***********/
710 | length: number;
711 | selector: string;
712 | [x: string]: HTMLElement;
713 | [x: number]: HTMLElement;
714 |
715 | /**********
716 | TRAVERSING
717 | ***********/
718 | add(selector: string, context?: any): JQuery;
719 | add(...elements: any[]): JQuery;
720 | add(html: string): JQuery;
721 | add(obj: JQuery): JQuery;
722 |
723 | children(selector?: any): JQuery;
724 |
725 | closest(selector: string): JQuery;
726 | closest(selector: string, context?: Element): JQuery;
727 | closest(obj: JQuery): JQuery;
728 | closest(element: any): JQuery;
729 | closest(selectors: any, context?: Element): any[];
730 |
731 | contents(): JQuery;
732 |
733 | end(): JQuery;
734 |
735 | eq(index: number): JQuery;
736 |
737 | filter(selector: string): JQuery;
738 | filter(func: (index: any) =>any): JQuery;
739 | filter(element: any): JQuery;
740 | filter(obj: JQuery): JQuery;
741 |
742 | find(selector: string): JQuery;
743 | find(element: any): JQuery;
744 | find(obj: JQuery): JQuery;
745 |
746 | first(): JQuery;
747 |
748 | has(selector: string): JQuery;
749 | has(contained: Element): JQuery;
750 |
751 | is(selector: string): boolean;
752 | is(func: (index: any) =>any): boolean;
753 | is(element: any): boolean;
754 | is(obj: JQuery): boolean;
755 |
756 | last(): JQuery;
757 |
758 | map(callback: (index: any, domElement: Element) =>any): JQuery;
759 |
760 | next(selector?: string): JQuery;
761 |
762 | nextAll(selector?: string): JQuery;
763 |
764 | nextUntil(selector?: string, filter?: string): JQuery;
765 | nextUntil(element?: Element, filter?: string): JQuery;
766 |
767 | not(selector: string): JQuery;
768 | not(func: (index: any) =>any): JQuery;
769 | not(element: any): JQuery;
770 | not(obj: JQuery): JQuery;
771 |
772 | offsetParent(): JQuery;
773 |
774 | parent(selector?: string): JQuery;
775 |
776 | parents(selector?: string): JQuery;
777 |
778 | parentsUntil(selector?: string, filter?: string): JQuery;
779 | parentsUntil(element?: Element, filter?: string): JQuery;
780 |
781 | prev(selector?: string): JQuery;
782 |
783 | prevAll(selector?: string): JQuery;
784 |
785 | prevUntil(selector?: string, filter?:string): JQuery;
786 | prevUntil(element?: Element, filter?:string): JQuery;
787 |
788 | siblings(selector?: string): JQuery;
789 |
790 | slice(start: number, end?: number): JQuery;
791 |
792 | /*********
793 | UTILITIES
794 | **********/
795 |
796 | queue(queueName?: string): any[];
797 | queue(queueName: string, newQueueOrCallback: any): JQuery;
798 | queue(newQueueOrCallback: any): JQuery;
799 | }
800 |
801 | interface EventTarget {
802 | //nodeName: string; //bugfix, duplicate identifier. see: http://stackoverflow.com/questions/14824143/duplicate-identifier-nodename-in-jquery-d-ts
803 | }
804 |
805 | declare var jQuery: JQueryStatic;
806 | declare var $: JQueryStatic;
--------------------------------------------------------------------------------
/less.d.ts:
--------------------------------------------------------------------------------
1 | declare module "less" {
2 | export var version: number[];
3 | export class tree {
4 | toCSS(options: RenderOptions) : string;
5 | }
6 | export class Parser {
7 | constructor (options?: ParserOptions);
8 | parse(text: string, callback: (error : Error, tree : tree) => void);
9 | }
10 | export class importer {
11 | }
12 |
13 | interface ParserOptions {
14 | paths?: string[];
15 | filename?: string;
16 | }
17 |
18 | interface RenderOptions {
19 | compress?: boolean;
20 | yuicompress?: boolean;
21 | }
22 |
23 | export function render(input : string, callback : (err : Error, result: string) => void) : void;
24 | export function render(input : string, options : RenderOptions, callback : (err : Error, result: string) => void) : void;
25 | export function writeError(ctx, options);
26 | }
--------------------------------------------------------------------------------
/memory-cache.d.ts:
--------------------------------------------------------------------------------
1 | declare module "memory-cache" {
2 | export function put(key: any, value: any, time?: number, timeoutCallback?: (key: any) => void) : void;
3 | export function get(key: any): any;
4 | export function del(key: any): void;
5 | export function clear(): void;
6 |
7 | export function size(): number;
8 | export function memsize(): number;
9 |
10 | export function debug(bool: boolean): void;
11 | export function hits(): number;
12 | export function misses(): number;
13 | }
--------------------------------------------------------------------------------
/mime.d.ts:
--------------------------------------------------------------------------------
1 | // https://github.com/broofa/node-mime
2 |
3 | declare module "mime" {
4 | export function lookup(path: string): string;
5 | export function extension(mime: string): string;
6 | export function load(filepath: string): void;
7 | export function define(mimes: any): void;
8 |
9 | interface Charsets {
10 | lookup(mime: string): string;
11 | }
12 |
13 | export var charsets: Charsets;
14 | }
15 |
--------------------------------------------------------------------------------
/mkdirp.d.ts:
--------------------------------------------------------------------------------
1 | // https://github.com/substack/node-mkdirp
2 |
3 | declare module "mkdirp" {
4 | export function(path: string, callback: (err: Error) => void): void;
5 | export function(path: string, mode: number, callback: (err: Error) => void): void;
6 | export function sync(path: string, mode: number): void;
7 | }
--------------------------------------------------------------------------------
/mocha.d.ts:
--------------------------------------------------------------------------------
1 | // BDD
2 | declare var describe : IMochaDescribeWithSkip;
3 |
4 | declare var it: IMochaTestWithSkip;
5 |
6 | declare var before : IMochaTest;
7 |
8 | declare var after : IMochaTest;
9 |
10 | declare var beforeEach : IMochaTest;
11 |
12 | declare var afterEach : IMochaTest;
13 |
14 | interface IMochaDescribe {
15 | (title: string, cb?: () => void) : void;
16 | }
17 |
18 | interface IMochaDescribeWithSkip extends IMochaDescribe {
19 | skip : IMochaDescribe;
20 | only : IMochaDescribe;
21 | }
22 |
23 | interface IMochaTest {
24 | (cb?: () => void) : void;
25 | (cb?: (done:(err? : Error) => void) => void) : void;
26 | (title: string, cb?: () => void) : void;
27 | (title: string, cb?: (done:(err? : Error) => void) => void) : void;
28 | }
29 |
30 | interface IMochaTestWithSkip extends IMochaTest {
31 | skip : IMochaTest;
32 | only : IMochaTest;
33 | }
34 |
35 | // TDD
36 | declare function suite(title: string, cb: () => void);
37 | declare function test(title: string, cb: () => void);
38 | declare function test(title: string, cb: (done:() => void) => void);
39 | declare function setup(title: string, cb: () => void);
40 | declare function teardown(title: string, cb: () => void);
41 |
42 | declare function suite(cb: () => void);
43 | declare function test(cb: () => void);
44 | declare function test(cb: (done:() => void) => void);
45 | declare function setup(cb: () => void);
46 | declare function teardown(cb: () => void);
47 |
--------------------------------------------------------------------------------
/moment.d.ts:
--------------------------------------------------------------------------------
1 | // https://github.com/timrwood/moment
2 | // 1.7.2
3 |
4 | declare module "moment" {
5 | import moment = require("moment");
6 |
7 | module _moment
8 | {
9 | class Duration {
10 | humanize(): string;
11 |
12 | asYears(): number;
13 | asMonths(): number;
14 | asDays(): number;
15 | asHours(): number;
16 | asMinutes(): number;
17 | asSeconds(): number;
18 | asMilliseconds(): number;
19 |
20 | years(): number;
21 | months(): number;
22 | days(): number;
23 | hours(): number;
24 | minutes(): number;
25 | seconds(): number;
26 | milliseconds(): number;
27 | }
28 |
29 | class Moment {
30 | add(type: string, count: number): Moment;
31 | add(info: any): Moment;
32 |
33 | subtract(type: string, count: number): Moment;
34 | subtract(info: any): Moment;
35 |
36 | year(value: number): Moment;
37 | month(value: number): Moment;
38 | day(value: number): Moment;
39 | date(value: number): Moment;
40 | hours(value: number): Moment;
41 | minutes(value: number): Moment;
42 | seconds(value: number): Moment;
43 | milliseconds(value: number): Moment;
44 |
45 | startOf(type: string): Moment;
46 | endOf(type: string): Moment;
47 |
48 | sod(type: string): Moment;
49 | eod(type: string): Moment;
50 |
51 | from(fromMoment: Moment, bool?: boolean): Moment;
52 | fromNow(bool?: boolean): Moment;
53 |
54 | local(): Moment;
55 | utc(): Moment;
56 |
57 | year(): number;
58 | month(): number;
59 | day(): number;
60 | date(): number;
61 | hours(): number;
62 | minutes(): number;
63 | seconds(): number;
64 | milliseconds(): number;
65 |
66 | isLeapYear(): boolean;
67 |
68 | zone(): number;
69 | daysInMonth(): number;
70 | isDST(): boolean;
71 |
72 | format(format?: string): string;
73 |
74 | //duration(): Duration;
75 | calendar(): string;
76 |
77 | diff(moment: Moment, string?: string, bool?: boolean): number;
78 |
79 | toDate(): Date;
80 | valueOf(): number;
81 | unix(): number;
82 |
83 | humanizeDuration(number: number, string?: string, bool?: boolean): string;
84 |
85 | lang(lang: string): Moment;
86 | lang(lang: boolean): Moment;
87 | lang(): string;
88 |
89 | isValid(): boolean;
90 | }
91 | }
92 |
93 | interface _moment
94 | {
95 | utc(): _moment.Moment;
96 | utc(date: Date): _moment.Moment;
97 | utc(moment: _moment.Moment): _moment.Moment;
98 | utc(unixEpoch: number): _moment.Moment;
99 | utc(date: string): _moment.Moment;
100 | utc(date: string, format: string): _moment.Moment;
101 | utc(date: string, formats: string[]): _moment.Moment;
102 | utc(array: number[]): _moment.Moment;
103 |
104 | isMoment(object?: any): boolean;
105 |
106 | lang(): string;
107 | lang(lang: string): void;
108 | lang(lang: string, info: any): void;
109 |
110 | months: any;
111 | monthsShort: any;
112 | weekdays: any;
113 | weekdaysShort: any;
114 | weekdaysMin: any;
115 | longDateFormat: { LT: string; L: string; LL: string; LLL: string; LLLL: string; };
116 | relativeTime: { future; past; s; m; mm; h; hh; d; dd; M; MM; y; yy; };
117 | meridiem: Function;
118 | calendar: { lastDay; sameDay; nextDay; lastWeek; nextWeek; sameElse; }
119 | ordinal: Function;
120 |
121 | duration(count: number, type?: string): _moment.Duration;
122 | duration(info: any): _moment.Duration;
123 |
124 | unix(unix?: number): _moment.Moment;
125 |
126 | (): _moment.Moment;
127 | (date: Date): _moment.Moment;
128 | (moment: _moment.Moment): _moment.Moment;
129 | (unixEpoch: number): _moment.Moment;
130 | (date: string): _moment.Moment;
131 | (date: string, format: string): _moment.Moment;
132 | (date: string, formats: string[]): _moment.Moment;
133 | (array: number[]): _moment.Moment;
134 | }
135 |
136 | export = _moment;
137 | }
--------------------------------------------------------------------------------
/mongodb.d.ts:
--------------------------------------------------------------------------------
1 | ///
2 |
3 | declare module "mongodb" {
4 |
5 | export function connect(uri: string, options: any, callback: (err: any, db: Db) => void);
6 | export function connect(uri: string, callback: (err: any, db: Db) => void);
7 |
8 | export class Server {
9 | constructor (host: string, port: number, opts?: ServerOptions);
10 | }
11 | export class Db {
12 | constructor (databaseName: string, serverConfig: Server, db_options?: DBOptions);
13 |
14 | public db(dbName: string): Db;
15 |
16 | public open(callback: (err : Error, db : Db) => void );
17 | public close(forceClose?: boolean, callback?: (err: any, result: any) => void );
18 | public admin(callback: (err, result) => void ): any;
19 | public collectionsInfo(collectionName: string, callback?: (err, result) => void );
20 | public collectionNames(collectionName: string, options: any, callback?: (err, result) => void );
21 |
22 | public collection(collectionName: string): Collection;
23 | public collection(collectionName: string, callback: (err: any, collection: Collection) => void ): Collection;
24 | public collection(collectionName: string, options: MongoCollectionOptions, callback: (err: any, collection: Collection) => void ): Collection;
25 |
26 | public collections(callback: (err: any, collections: Collection[]) => void );
27 | public eval(code: any, parameters: any[], options?: any, callback?: (err, result) => void );
28 | //public dereference(dbRef: DbRef, callback: (err, result) => void);
29 |
30 | public logout(options: any, callback?: (err, result) => void );
31 | public logout(callback: (err, result) => void );
32 |
33 | public authenticate(userName: string, password: string, callback?: (err, result) => void );
34 | public authenticate(userName: string, password: string, options: any, callback?: (err, result) => void );
35 |
36 | public addUser(username: string, password: string, callback?: (err, result) => void );
37 | public addUser(username: string, password: string, options: any, callback?: (err, result) => void );
38 |
39 | public removeUser(username: string, callback?: (err, result) => void );
40 | public removeUser(username: string, options: any, callback?: (err, result) => void );
41 |
42 | public createCollection(collectionName: string, callback?: (err: Error, result: Collection) => void );
43 | public createCollection(collectionName: string, options: CollectionCreateOptions, callback?: (err, result) => void );
44 |
45 | public command(selector: any, callback?: (err, result) => void );
46 | public command(selector: any, options: any, callback?: (err, result) => void );
47 |
48 | public dropCollection(collectionName: string, callback?: (err, result) => void );
49 | public renameCollection(fromCollection: string, toCollection: string, callback?: (err, result) => void );
50 |
51 | public lastError(options, connectionOptions, callback: (err, result) => void );
52 | public previousError(options, callback: (err, result) => void );
53 |
54 | // error = lastError
55 | // lastStatus = lastError
56 |
57 | public executeDbCommand(command_hash, callback?: (err, result) => void );
58 | public executeDbCommand(command_hash, options, callback?: (err, result) => void );
59 |
60 | public executeDbAdminCommand(command_hash, callback?: (err, result) => void );
61 | public executeDbAdminCommand(command_hash, options, callback?: (err, result) => void );
62 |
63 | public resetErrorHistory(callback?: (err, result) => void );
64 | public resetErrorHistory(options, callback?: (err, result) => void );
65 |
66 | public createIndex(collectionName, fieldOrSpec, options, callback);
67 | public ensureIndex(collectionName, fieldOrSpec, options, callback);
68 |
69 | public cursorInfo(options, callback);
70 |
71 | public dropIndex(collectionName, indexName, callback);
72 | public reIndex(collectionName, callback);
73 | public indexInformation(collectionName, options, callback);
74 | public dropDatabase(callback: (err, result) => void );
75 |
76 | public stats(options, callback);
77 | public _registerHandler(db_command, raw, connection, exhaust, callback);
78 | public _reRegisterHandler(newId, object, callback);
79 | public _callHandler(id, document, err);
80 | public _hasHandler(id);
81 | public _removeHandler(id);
82 | public _findHandler(id): { id: string; callback: Function; };
83 | public __executeQueryCommand(self, db_command, options, callback);
84 |
85 | public DEFAULT_URL: string;
86 |
87 | public connect(url: string, options: { uri_decode_auth?: boolean; }, callback: (err, result) => void );
88 |
89 | public addListener(event: string, handler:(param: any) => any);
90 | }
91 |
92 | export class ObjectID {
93 | constructor (s: string);
94 | }
95 |
96 | export interface SocketOptions {
97 | //= set seconds before connection times out default:0
98 | timeout?: number;
99 | //= Disables the Nagle algorithm default:true
100 | noDelay?: boolean;
101 | //= Set if keepAlive is used default:0 , which means no keepAlive, set higher than 0 for keepAlive
102 | keepAlive?: number;
103 | //= ‘ascii’|’utf8’|’base64’ default:null
104 | encoding?: string;
105 | }
106 |
107 | export interface ServerOptions {
108 | // - to reconnect automatically, default:false
109 | auto_reconnect?: boolean;
110 | // - specify the number of connections in the pool default:1
111 | poolSize?: number;
112 | // - a collection of pr socket settings
113 | socketOptions?: any;
114 | }
115 |
116 | export interface PKFactory {
117 | counter: number;
118 | createPk: () => number;
119 | }
120 |
121 | export interface DBOptions {
122 | //- if true, use native BSON parser
123 | native_parser?: boolean;
124 | //- sets strict mode , if true then existing collections can’t be “recreated” etc.
125 | strict?: boolean;
126 | //- custom primary key factory to generate _id values (see Custom primary keys).
127 | pk?: PKFactory;
128 | //- generation of objectid is delegated to the mongodb server instead of the driver. default is false
129 | forceServerObjectId?: boolean;
130 | //- specify the number of milliseconds between connection attempts default:5000
131 | retryMiliSeconds?: number;
132 | //- specify the number of retries for connection attempts default:3
133 | numberOfRetries?: number;
134 | //- enable/disable reaper (true/false) default:false
135 | reaper?: boolean;
136 | //- specify the number of milliseconds between each reaper attempt default:10000
137 | reaperInterval?: number;
138 | //- specify the number of milliseconds for timing out callbacks that don’t return default:30000
139 | reaperTimeout?: number;
140 | //- driver expects Buffer raw bson document, default:false
141 | raw?: boolean;
142 | }
143 |
144 | export interface CollectionCreateOptions {
145 | // {true | {w:n, wtimeout:n} | {fsync:true}, default:false}, executes with a getLastError command returning the results of the command on MongoDB.
146 | safe?: boolean;
147 | // {Boolean, default:false}, serialize functions on the document.
148 | serializeFunctions?: boolean;
149 | // {Boolean, default:false}, perform all operations using raw bson objects.
150 | raw?: boolean;
151 | // object overriding the basic ObjectID primary key generation.
152 | pkFactory?: PKFactory;
153 | // {Boolean, default:false}, create a capped collection.
154 | capped?: boolean;
155 | // {Number}, the size of the capped collection in bytes.
156 | size?: number;
157 | // {Number}, the maximum number of documents in the capped collection.
158 | max?: number;
159 | // {Boolean, default:false}, create an index on the _id field of the document, not created automatically on capped collections.
160 | autoIndexId?: boolean;
161 | // {String}, the prefered read preference (ReadPreference.PRIMARY, ReadPreference.PRIMARY_PREFERRED, ReadPreference.SECONDARY, ReadPreference.SECONDARY_PREFERRED, ReadPreference.NEAREST).
162 | readPreference?: string;
163 | }
164 |
165 | export interface Collection {
166 | //constructor (db: Db, collectionName: string, pkFactory, options);
167 |
168 | insert(query: any, callback: (err: any, result: any) => void): void;
169 | insert(query: any, options: { safe?: any; continueOnError?: boolean; keepGoing?: boolean; serializeFunctions?: boolean; }, callback: (err: any, result: any) => void): void;
170 |
171 | remove(selector, callback?: (err: any, result: any) => void);
172 | remove(selector, options: { safe?: any; single?: boolean; }, callback?: (err: any, result: any) => void);
173 |
174 | rename(newName: String, callback?: (err, result) => void);
175 |
176 | save(doc: any, callback : (err, result) => void);
177 | save(doc: any, options: { safe: any; }, callback : (err, result) => void);
178 |
179 | update(selector: any, document: any, callback?: (err: any, result: any) => void): void;
180 | update(selector: any, document: any, options: { safe?; upsert?; multi?; serializeFunctions?; }, callback: (err: any, result: any) => void): void;
181 |
182 | distinct(key: string, query: Object, callback: (err, result) => void);
183 | distinct(key: string, query: Object, options: { readPreferences; }, callback: (err, result) => void);
184 |
185 | count(callback: (err, result) => void);
186 | count(query: Object, callback: (err, result) => void);
187 | count(query: Object, options: { readPreferences; }, callback: (err, result) => void);
188 |
189 | drop(callback?: (err, result) => void);
190 |
191 | findAndModify(query: Object, sort: any[], doc: Object, callback: (err, result) => void);
192 | findAndModify(query: Object, sort: any[], doc: Object, options: { safe?: any; remove?: boolean; upsert?: boolean; new?: boolean; }, callback: (err, result) => void);
193 |
194 | findAndRemove(query : Object, sort? : any[], callback?: (err, result) => void);
195 | findAndRemove(query : Object, sort? : any[], options?: { safe; }, callback?: (err, result) => void);
196 |
197 | find(callback?: (err: any, result: Cursor) => void): Cursor;
198 | find(selector: any, callback?: (err: any, result: Cursor) => void): Cursor;
199 | find(selector: any, fields: any, callback?: (err: any, result: Cursor) => void): Cursor;
200 | find(selector: any, options: CollectionFindOptions, callback?: (err: any, result: Cursor) => void): Cursor;
201 | find(selector: any, fields: any, options: CollectionFindOptions, callback?: (err: any, result: Cursor) => void): Cursor;
202 | find(selector: any, fields: any, skip: number, limit: number, callback?: (err: any, result: Cursor) => void): Cursor;
203 | find(selector: any, fields: any, skip: number, limit: number, timeout: number, callback?: (err: any, result: Cursor) => void): Cursor;
204 |
205 | findOne(callback?: (err: any, result: any) => void): Cursor;
206 | findOne(selector: any, callback?: (err: any, result: any) => void): Cursor;
207 | findOne(selector: any, fields: any, callback?: (err: any, result: any) => void): Cursor;
208 | findOne(selector: any, options: CollectionFindOptions, callback?: (err: any, result: any) => void): Cursor;
209 | findOne(selector: any, fields: any, options: CollectionFindOptions, callback?: (err: any, result: any) => void): Cursor;
210 | findOne(selector: any, fields: any, skip: number, limit: number, callback?: (err: any, result: any) => void): Cursor;
211 | findOne(selector: any, fields: any, skip: number, limit: number, timeout: number, callback?: (err: any, result: any) => void): Cursor;
212 |
213 | createIndex(fieldOrSpec, options: IndexOptions, callback: (err: Error, indexName: string) => void);
214 | ensureIndex(fieldOrSpec, options: IndexOptions, callback: (err: Error, indexName: string) => void);
215 | indexInformation(options, callback);
216 | dropIndex(name, callback);
217 | dropAllIndexes(callback);
218 | // dropIndexes = dropAllIndexes
219 |
220 | reIndex(callback);
221 | mapReduce(map, reduce, options, callback);
222 | group(keys, condition, initial, reduce, finalize, command, options, callback);
223 | options(callback);
224 | isCapped(callback);
225 | indexExists(indexes, callback);
226 | geoNear(x, y, options, callback);
227 | geoHaystackSearch(x, y, options, callback);
228 | indexes(callback);
229 | aggregate(pipeline: any[], callback: (err: Error, results: any) => void);
230 | aggregate(pipeline: any[], options, callback: (err: Error, results: any) => void);
231 | stats(options, callback);
232 |
233 | hint;
234 | }
235 |
236 | export interface IndexOptions {
237 | background?: boolean;
238 | dropDups?: boolean;
239 | sparse?: boolean;
240 | unique?: boolean;
241 | v?: number;
242 | }
243 |
244 | export class Cursor {
245 | constructor (db, collection, selector, fields, skip, limit, sort, hint, explain, snapshot, timeout, tailable, batchSize, slaveOk, raw, read, returnKey, maxScan, min, max, showDiskLoc, comment, awaitdata, numberOfRetries, dbName, tailableRetryInterval, exhaust, partial);
246 |
247 | rewind() : Cursor;
248 | toArray(callback: (err: any, results: any[]) => any) : void;
249 | each(callback: (err: Error, item: any) => void) : void;
250 | count(callback: (err: any, count: number) => void) : void;
251 |
252 | sort(keyOrList : any, callback? : (err, result) => void): Cursor;
253 | sort(keyOrList : String, direction : any, callback? : (err, result) => void): Cursor;
254 |
255 | limit(limit: number, callback?: (err, result) => void): Cursor;
256 | setReadPreference(readPreferences, tags, callback?): Cursor;
257 | skip(skip: number, callback?: (err, result) => void): Cursor;
258 | batchSize(batchSize, callback: (err, result) => void): Cursor;
259 |
260 | nextObject(callback: (err:any, doc: any) => void);
261 | explain(callback: (err, result) => void);
262 | //stream(): CursorStream;
263 |
264 | close(callback?: (err, result) => void);
265 | isClosed(): Boolean;
266 |
267 | static INIT;
268 | static OPEN;
269 | static CLOSED;
270 | }
271 |
272 | export interface CollectionFindOptions {
273 | limit?;
274 | sort?;
275 | fields?;
276 | skip?;
277 | hint?;
278 | explain?;
279 | snapshot?;
280 | timeout?;
281 | tailtable?;
282 | tailableRetryInterval?;
283 | numberOfRetries?;
284 | awaitdata?;
285 | exhaust?;
286 | batchSize?;
287 | returnKey?;
288 | maxScan?;
289 | min?;
290 | max?;
291 | showDiskLoc?;
292 | comment?;
293 | raw?;
294 | readPreferences?;
295 | partial?;
296 | }
297 |
298 | export interface MongoCollectionOptions {
299 | safe?: any;
300 | serializeFunctions?: any;
301 | raw?: boolean;
302 | pkFactory?: any;
303 | readPreferences?: string;
304 | }
305 | }
306 |
--------------------------------------------------------------------------------
/mu2.d.ts:
--------------------------------------------------------------------------------
1 | declare module "mu2" {
2 | export var root: string;
3 |
4 | export function compileAndRender(templateName: string, view: any) : ReadableStream;
5 |
6 | export function compile(filename: string, callback: (err, parsed: IParsed) => void): void;
7 |
8 | export function compileText(name: string, template: string, callback: (err, parsed: IParsed) => void): void;
9 | export function compileText(name: string, template: string): IParsed;
10 | export function compileText(template: string): IParsed;
11 |
12 | export function render(filenameOrParsed: string, view: any): ReadableStream;
13 | export function render(filenameOrParsed: IParsed, view: any): ReadableStream;
14 |
15 | export function renderText(template: string, view : any, partials? :any) : ReadableStream;
16 |
17 | export function clearCache(templateName?: string) : void;
18 |
19 | export interface IParsed { }
20 | }
--------------------------------------------------------------------------------
/nconf.d.ts:
--------------------------------------------------------------------------------
1 | declare module "nconf" {
2 | export var version: number;
3 | export var stores: any;
4 | export var sources: any[];
5 |
6 | export function clear(key: string, callback?: ICallbackFunction): any;
7 | export function get (key: string, callback?: ICallbackFunction): any;
8 | export function merge(key: string, value: any, callback?: ICallbackFunction): any;
9 | export function set (key: string, value: any, callback?: ICallbackFunction): any;
10 | export function reset(callback?: ICallbackFunction): any;
11 |
12 | export function load(callback?: ICallbackFunction): any;
13 | export function mergeSources(data: any): void;
14 | export function loadSources(): any;
15 | export function save(value: any, callback?: ICallbackFunction): any;
16 |
17 | export function add(name: string, options?: IOptions): Provider;
18 | export function argv(options?: IOptions): Provider;
19 | export function env(options?: IOptions): Provider;
20 | export function file(name: string, options?: IFileOptions): Provider;
21 | export function file(options: IFileOptions): Provider;
22 | export function use(name: string, options?: IOptions): Provider;
23 | export function defaults(options?: IOptions): Provider;
24 | export function init(options?: IOptions): void;
25 | export function overrides(options?: IOptions): Provider;
26 | export function remove(name: string): void;
27 | export function create(name: string, options: IOptions): IStore;
28 |
29 | export function key(...values: any[]): string;
30 | export function path(key: any): any[];
31 | export function loadFiles(files: any, callback?: ICallbackFunction);
32 | export function loadFilesSync(files: any, callback?: ICallbackFunction);
33 |
34 | export enum formats {
35 | json,
36 | ini
37 | }
38 |
39 | export interface IOptions {
40 | type?: string;
41 | }
42 |
43 | export interface IFileOptions extends IOptions {
44 | file?: string;
45 | dir?: string;
46 | search?: boolean;
47 | json_spacing?: number;
48 | }
49 |
50 |
51 | export interface ICallbackFunction { (err?: any); }
52 |
53 | export class Provider {
54 | constructor(options: IOptions);
55 |
56 | stores: any;
57 | sources: any[];
58 |
59 | clear(key: string, callback?: ICallbackFunction): any;
60 | get (key: string, callback?: ICallbackFunction): any;
61 | merge(key: string, value: any, callback?: ICallbackFunction): any;
62 | set (key: string, value: any, callback?: ICallbackFunction): any;
63 | reset(callback?: ICallbackFunction): any;
64 |
65 | load(callback?: ICallbackFunction): any;
66 | mergeSources(data: any): void;
67 | loadSources(): any;
68 | save(value: any, callback?: ICallbackFunction): any;
69 |
70 | add(name: string, options?: IOptions): Provider;
71 | argv(options?: IOptions): Provider;
72 | env(options?: IOptions): Provider;
73 | file(name: string, options?: IFileOptions): Provider;
74 | file(options: IFileOptions): Provider;
75 | use(name: string, options?: IOptions): Provider;
76 |
77 | defaults(options?: IOptions): Provider;
78 | init(options?: IOptions): void;
79 | overrides(options?: IOptions): Provider;
80 | remove(name: string): void;
81 | create(name: string, options: IOptions): IStore;
82 | }
83 |
84 |
85 | export interface IStore {
86 | type: string;
87 | get (key: string): any;
88 | set (key: string, value: any): boolean;
89 | clear(key: string): boolean;
90 | merge(key: string, value: any): boolean;
91 | reset(callback?: ICallbackFunction): boolean;
92 | }
93 |
94 | }
--------------------------------------------------------------------------------
/nock.d.ts:
--------------------------------------------------------------------------------
1 | declare module "nock" {
2 | export = nock;
3 |
4 | function nock (host: string, options?: nock.Options): nock.Scope;
5 |
6 | module nock {
7 | function cleanAll(): void;
8 | var recorder: Recorder;
9 |
10 | class Scope {
11 | get(path: string, data?: string): Scope;
12 | post(path: string, data?: string): Scope;
13 | put(path: string, data?: string): Scope;
14 | head(path: string): Scope;
15 | delete(path: string, data?: string): Scope;
16 | intercept(path: string, verb: string, body?: string, options?: any);
17 |
18 | reply(responseCode: number, body?: string, headers?: any): Scope;
19 | reply(responseCode: number, callback: (uri: string, body: string) => string, headers?: any): Scope;
20 | replyWithFile(responseCode: number, fileName: string): Scope;
21 |
22 | defaultReplyHeaders(headers: any);
23 | matchHeader(name: string, value: string);
24 |
25 | filteringPath(regex: RegExp, replace: string): Scope;
26 | filteringPath(fn: (path: string) => string): Scope;
27 | filteringRequestBody(regex: RegExp, replace: string): Scope;
28 | filteringRequestBody(fn: (path: string) => string): Scope;
29 |
30 | persist(): Scope;
31 | log(out: () => void ): Scope;
32 |
33 | done(): void;
34 | isDone(): bool;
35 | restore(): void;
36 | }
37 |
38 | class Recorder {
39 | rec(capture?: bool): void;
40 | play(): string[];
41 | }
42 |
43 | interface Options {
44 | allowUnmocked?: bool;
45 | }
46 | }
47 | }
--------------------------------------------------------------------------------
/nodeunit.d.ts:
--------------------------------------------------------------------------------
1 | declare module nodeunit {
2 | export class Test {
3 | done(err?: any): void;
4 | expect(num: number): void;
5 |
6 | //assersions from node assert module
7 | fail(actual: any, expected: any, message: string, operator: string): void;
8 | assert(value: any, message: string): void;
9 | ok(value: any, message?: string): void;
10 | equal(actual: any, expected: any, message?: string): void;
11 | notEqual(actual: any, expected: any, message?: string): void;
12 | deepEqual(actual: any, expected: any, message?: string): void;
13 | notDeepEqual(acutal: any, expected: any, message?: string): void;
14 | strictEqual(actual: any, expected: any, message?: string): void;
15 | notStrictEqual(actual: any, expected: any, message?: string): void;
16 | throws(block: any, error?: any, messsage?: string): void;
17 | doesNotThrow(block: any, error?: any, messsage?: string): void;
18 | ifError(value: any): void;
19 |
20 | //assertion wrappers
21 | equals(actual: any, expected: any, message?: string): void;
22 | same(actual: any, expected: any, message?: string): void;
23 | }
24 |
25 | // Test Group Usage:
26 | // var testGroup: nodeunit.ITestGroup = {
27 | // setUp: function (callback: nodeunit.ICallbackFunction): void {
28 | // callback();
29 | // },
30 | // tearDown: function (callback: nodeunit.ICallbackFunction): void {
31 | // callback();
32 | // },
33 | // test1: function (test: nodeunit.Test): void {
34 | // test.done();
35 | // }
36 | // }
37 | // exports.testgroup = testGroup;
38 |
39 | export interface ITestGroup {
40 | setUp?: (callback: ICallbackFunction) => void;
41 | tearDown?: (callback: ICallbackFunction) => void;
42 | }
43 |
44 | export interface ICallbackFunction { (err?: any): void; }
45 | }
46 |
47 |
--------------------------------------------------------------------------------
/optimist.d.ts:
--------------------------------------------------------------------------------
1 | // https://github.com/substack/node-optimist
2 |
3 | declare module "optimist" {
4 | import optimist = module("optimist");
5 |
6 | export class Optimist {
7 | default(name: string, value: any): Optimist;
8 | default(args: any): Optimist;
9 |
10 | boolean(name: string): Optimist;
11 | boolean(names: string[]): Optimist;
12 |
13 | string(name: string): Optimist;
14 | string(names: string[]): Optimist;
15 |
16 | wrap(columns): Optimist;
17 |
18 | help(): Optimist;
19 | showHelp(fn: Function): Optimist;
20 |
21 | usage(message: string): Optimist;
22 |
23 | demand(key: string): Optimist;
24 | demand(key: number): Optimist;
25 | demand(key: string[]): Optimist;
26 |
27 | alias(key: string, alias: string): Optimist;
28 |
29 | describe(key: string, desc: string): Optimist;
30 |
31 | options(key: string, opt: any): Optimist;
32 |
33 | check(fn: Function);
34 |
35 | parse(args: string[]): Optimist;
36 |
37 | argv: Argv;
38 | }
39 |
40 | export function default(name: string, value: any): Optimist;
41 | export function default(args: any): Optimist;
42 |
43 | export function boolean(name: string): Optimist;
44 | export function boolean(names: string[]): Optimist;
45 |
46 | export function string(name: string): Optimist;
47 | export function string(names: string[]): Optimist;
48 |
49 | export function wrap(columns): Optimist;
50 |
51 | export function help(): Optimist;
52 | export function showHelp(fn: Function): Optimist;
53 |
54 | export function usage(message: string): Optimist;
55 |
56 | export function demand(key: string): Optimist;
57 | export function demand(key: number): Optimist;
58 | export function demand(key: string[]): Optimist;
59 |
60 | export function alias(key: string, alias: string): Optimist;
61 |
62 | export function describe(key: string, desc: string): Optimist;
63 |
64 | export function options(key: string, opt: any): Optimist;
65 |
66 | export function check(fn: Function);
67 |
68 | export function parse(args: string[]): Optimist;
69 |
70 | export var argv: Argv;
71 |
72 | export function(args: string[]): Optimist;
73 |
74 | export interface Argv {
75 | _: string[];
76 | }
77 | }
--------------------------------------------------------------------------------
/passport.d.ts:
--------------------------------------------------------------------------------
1 | declare module "passport" {
2 |
3 | function use(name:string, strategy);
4 |
5 | function unuse(name:string);
6 |
7 | function framework(fw:string);
8 |
9 | function initialize(options:Object);
10 |
11 | function session(options:Object);
12 |
13 | function authenticate(strategy:any, options?:Object, callback?:Function);
14 |
15 | function authorize(strategy, options, callback);
16 |
17 | function serializeUser(fn, done);
18 |
19 | function deserializeUser(fn, done);
20 |
21 | function transformAuthInfo(fn, done);
22 | }
23 |
--------------------------------------------------------------------------------
/q.d.ts:
--------------------------------------------------------------------------------
1 | declare module "q" {
2 | export class deferred {
3 | promise : makePromise;
4 | public resolve(resolvedValue) : any;
5 | public reject(exception) : any;
6 | public notify() : void;
7 | }
8 |
9 | export function defer() : deferred;
10 |
11 | export class makePromise {
12 | constructor (descriptor, fallback, valueOf, exception);
13 |
14 | public then(fulfilled? , rejected? , progressed? ) : makePromise;
15 |
16 | public isResolved() : boolean;
17 | public isFulfilled() : boolean;
18 | public isRejected() : boolean;
19 | public when(fulfilled?, rejected?, progressed?) : makePromise;
20 | public spread(fulfilled?, rejected?) : makePromise;
21 | public send(op) : makePromise;
22 | public get() : makePromise;
23 | public put() : makePromise;
24 | public del() : makePromise;
25 | public post() : makePromise;
26 | public invoke(name/*, args...*/);
27 | public keys();
28 | public apply();
29 | public call();
30 | public bind();
31 | public fapply();
32 | public fcall();
33 | public fbind();
34 | public all();
35 | public allResolved();
36 | public view();
37 | public viewInfo();
38 | public timeout();
39 | public delay();
40 | public catch();
41 | public finally();
42 | public fail();
43 | public fin();
44 | public progress();
45 | public end();
46 | public ncall();
47 | public napply();
48 | public nbind();
49 | public npost();
50 | public ninvoke();
51 | public nend();
52 | }
53 |
54 | export function when(promise : makePromise, fulfilled, rejected, progressed) : makePromise;
55 | }
--------------------------------------------------------------------------------
/redis.d.ts:
--------------------------------------------------------------------------------
1 | // https://github.com/mranney/node_redis
2 |
3 | declare module "redis" {
4 | export function createClient(port_arg, host_arg, options: any) : RedisClient;
5 | export function print(err: Error, reply: any);
6 | export var debug_mode: bool;
7 |
8 | interface RedisClient {
9 | // event: connect
10 | // event: error
11 | // event: message
12 | // event: pmessage
13 | // event: subscribe
14 | // event: psubscribe
15 | // event: unsubscribe
16 | // event: punsubscribe
17 |
18 | end();
19 |
20 | // Connection (http://redis.io/commands#connection)
21 | auth(password: string, callback?: (err: Error, reply: any) => void);
22 | ping(callback?: (err: Error, reply: number) => void);
23 |
24 | // Strings (http://redis.io/commands#strings)
25 | append(key: string, value: string, callback?: (err: Error, reply: number) => void);
26 | bitcount(key: string, callback?: (err: Error, reply: number) => void);
27 | bitcount(key: string, start: number, end:number, callback?: (err: Error, reply: number) => void);
28 | set(key: string, value: string, callback?: (err: Error, reply: string) => void);
29 | get(key: string, callback?: (err: Error, reply: string) => void);
30 | exists(key: string, value: string, callback?: (err: Error, reply: number) => void);
31 |
32 | /*
33 | commands = set_union([
34 | "get", "set", "setnx", "setex", "append", "strlen", "del", "exists", "setbit", "getbit", "setrange", "getrange", "substr",
35 | "incr", "decr", "mget", "rpush", "lpush", "rpushx", "lpushx", "linsert", "rpop", "lpop", "brpop", "brpoplpush", "blpop", "llen", "lindex",
36 | "lset", "lrange", "ltrim", "lrem", "rpoplpush", "sadd", "srem", "smove", "sismember", "scard", "spop", "srandmember", "sinter", "sinterstore",
37 | "sunion", "sunionstore", "sdiff", "sdiffstore", "smembers", "zadd", "zincrby", "zrem", "zremrangebyscore", "zremrangebyrank", "zunionstore",
38 | "zinterstore", "zrange", "zrangebyscore", "zrevrangebyscore", "zcount", "zrevrange", "zcard", "zscore", "zrank", "zrevrank", "hset", "hsetnx",
39 | "hget", "hmset", "hmget", "hincrby", "hdel", "hlen", "hkeys", "hvals", "hgetall", "hexists", "incrby", "decrby", "getset", "mset", "msetnx",
40 | "randomkey", "select", "move", "rename", "renamenx", "expire", "expireat", "keys", "dbsize", "auth", "ping", "echo", "save", "bgsave",
41 | "bgrewriteaof", "shutdown", "lastsave", "type", "multi", "exec", "discard", "sync", "flushdb", "flushall", "sort", "info", "monitor", "ttl",
42 | "persist", "slaveof", "debug", "config", "subscribe", "unsubscribe", "psubscribe", "punsubscribe", "publish", "watch", "unwatch", "cluster",
43 | "restore", "migrate", "dump", "object", "client", "eval", "evalsha"], require("./lib/commands"));
44 | */
45 |
46 | connected: bool;
47 | retry_delay: number;
48 | retry_backoff: number;
49 | command_queue: any[];
50 | offline_queue: any[];
51 | server_info: { redis_version: string, versions: number[] };
52 | }
53 | }
--------------------------------------------------------------------------------
/request.d.ts:
--------------------------------------------------------------------------------
1 | ///
2 | ///
3 |
4 | // https://github.com/mikeal/request
5 |
6 | declare module "request" {
7 | export = request;
8 |
9 | import stream = require('stream');
10 | import http = require('http');
11 | import FormData = require('form-data');
12 | import url = require('url');
13 |
14 | function request(uri: string, options?: request.Options, callback?: (error: any, response: any, body: any) => void ): request.Request;
15 | function request(uri: string, callback?: (error: any, response: any, body: any) => void ): request.Request;
16 | function request(options: request.Options, callback?: (error: any, response: any, body: any) => void ): request.Request;
17 |
18 | module request {
19 | export function request(uri: string, options: Options, callback?: (error: any, response: any, body: any) => void ): Request;
20 | export var initParams;
21 | export function defaults(options, requester);
22 | export function forever(agentOptions, optionsArg);
23 | export function jar(): CookieJar;
24 | export function cookie(str: string): Cookie;
25 |
26 | export function get(uri: string, options?: Options, callback?: (error: any, response: any, body: any) => void ): Request;
27 | export function get(uri: string, callback?: (error: any, response: any, body: any) => void ): Request;
28 | export function get(options: Options, callback?: (error: any, response: any, body: any) => void ): Request;
29 |
30 | export function post(uri: string, options?: Options, callback?: (error: any, response: any, body: any) => void ): Request;
31 | export function post(uri: string, callback?: (error: any, response: any, body: any) => void ): Request;
32 | export function post(options: Options, callback?: (error: any, response: any, body: any) => void ): Request;
33 |
34 | export function put(uri: string, options?: Options, callback?: (error: any, response: any, body: any) => void ): Request;
35 | export function put(uri: string, callback?: (error: any, response: any, body: any) => void ): Request;
36 | export function put(options: Options, callback?: (error: any, response: any, body: any) => void ): Request;
37 |
38 | export function head(uri: string, options?: Options, callback?: (error: any, response: any, body: any) => void ): Request;
39 | export function head(uri: string, callback?: (error: any, response: any, body: any) => void ): Request;
40 | export function head(options: Options, callback?: (error: any, response: any, body: any) => void ): Request;
41 |
42 | export function del(uri: string, options?: Options, callback?: (error: any, response: any, body: any) => void ): Request;
43 | export function del(uri: string, callback?: (error: any, response: any, body: any) => void ): Request;
44 | export function del(options: Options, callback?: (error: any, response: any, body: any) => void ): Request;
45 |
46 | interface Options {
47 | uri?: string;
48 | callback?: (error: any, response: any, body: any) => void;
49 | jar?;
50 | form?;
51 | oauth?;
52 | aws?;
53 | qs?;
54 | json?;
55 | multipart?;
56 | ca?;
57 | agentOptions?;
58 | agentClass?;
59 | forever?;
60 | requestBodyStream?;
61 | host?;
62 | port?;
63 | method?;
64 | headers?;
65 | body?;
66 | followRedirect?;
67 | followAllRedirects?;
68 | maxRedirects?;
69 | encoding?;
70 | pool?;
71 | timeout?;
72 | proxy?;
73 | strictSSL?;
74 | }
75 |
76 | interface Request {
77 | // _updateProtocol();
78 | getAgent(): http.Agent;
79 | //start();
80 | //abort();
81 | pipeDest(dest);
82 | setHeader(name: string, value: string, clobber?: boolean): Request;
83 | setHeaders(headers: any): Request;
84 | qs(q: any, clobber?: boolean): Request;
85 | form(form: any): FormData.FormData;
86 | multipart(multipart: { body: any; }[]): Request;
87 | json(val: any): Request;
88 | aws(opts, now): Request;
89 | oauth(oauth): Request;
90 | jar(jar): Request;
91 | pipe(dest: stream.WritableStream, opts: any): stream.WritableStream;
92 | write();
93 | end(chunk);
94 | pause();
95 | resume();
96 | abort();
97 | destroy();
98 | toJSON(): string;
99 | }
100 |
101 | export interface CookieJar {
102 | setCookie(cookie: Cookie, uri: string|url.Url, options?: any): void
103 | getCookieString(uri: string|url.Url)
104 | getCookies(uri: string|url.Url)
105 | }
106 |
107 | export interface Cookie extends Array<{ name; value; httpOnly; }> {
108 | constructor(str, req);
109 | str: string;
110 | expires: Date;
111 | path: string;
112 | toString(): string;
113 | }
114 |
115 | }
116 | }
117 |
--------------------------------------------------------------------------------
/rimraf.d.ts:
--------------------------------------------------------------------------------
1 | // https://github.com/isaacs/rimraf
2 |
3 | export module "rimraf" {
4 | export var EMFILE_MAX: number;
5 | export var BUSYTRIES_MAX: number;
6 | function(path: string, callback: (error: Error) => void);
7 | function sync(path: string);
8 | }
--------------------------------------------------------------------------------
/semver.d.ts:
--------------------------------------------------------------------------------
1 | // https://github.com/isaacs/node-semver
2 |
3 | declare module "semver" {
4 | export function valid(v: string): string;
5 | export function inc(v: string, release: string): string;
6 | export function clean(v: string): string;
7 | export function gt(v1: string, v2: string): bool;
8 | export function gte(v1: string, v2: string): bool;
9 | export function lt(v1: string, v2: string): bool;
10 | export function lte(v1: string, v2: string): bool;
11 | export function eq(v1: string, v2: string): bool;
12 | export function neq(v1: string, v2: string): bool;
13 | export function cmp(v1: string, comparator: Function, v2: string): bool;
14 | export function compare(v1: string, v2: string): number;
15 | export function rcompare(v1: string, v2: string): number;
16 | export function validRange(range: string): string;
17 | export function satisfies(version: string, range: string): string;
18 | export function maxSatisfying(versions: string[], range: string): string;
19 | }
--------------------------------------------------------------------------------
/send.d.ts:
--------------------------------------------------------------------------------
1 | ///
2 | declare module "send" {
3 | //import send = require("send");
4 |
5 | function _send(req: any, path: string, options?: _send.Options): _send.SendStream;
6 |
7 | module _send {
8 | export interface Options {
9 | start?: number;
10 | end?: number;
11 | }
12 |
13 | export interface SendStream {
14 | req: any;
15 | path: string;
16 | options: Options;
17 |
18 | //constructor(req, path, options);
19 | hidden(set): SendStream;
20 | index(value: string): SendStream;
21 | root(value: string): SendStream;
22 | from(value: string): SendStream;
23 | maxage(ms: number): SendStream;
24 | //error(status, err) : SendStream;
25 | //isMalicious() : SendStream;
26 | //hasTrailingSlash() : SendStream;
27 | //hasLeadingDot() : SendStream;
28 | //isConditionalGET() : SendStream;
29 | //removeContentHeaderFields() : SendStream;
30 | //notModified() : SendStream;
31 | //isCachable() : SendStream;
32 | //onStatError(err) : SendStream;
33 | //isFresh() : SendStream;
34 | //redirect() : SendStream;
35 | pipe(res);
36 | send(path, stat);
37 | //stream(path, options);
38 | //type(path);
39 | //setHeader(stat);
40 | }
41 | }
42 |
43 | export = _send;
44 | }
45 |
46 |
--------------------------------------------------------------------------------
/should.d.ts:
--------------------------------------------------------------------------------
1 | declare module "should" {
2 |
3 | }
4 |
5 | interface Object {
6 | should: any;
7 | be: any;
8 | not: any;
9 | an: any;
10 | ok: any;
11 | arguments: any;
12 | empty: any;
13 | true: any;
14 | false: any;
15 | json: any;
16 | html: any;
17 | include(obj: any): any;
18 | includeEql(obj: any): any;
19 | throw (): any;
20 | throwError(regExp: RegExp): any;
21 | within(start: number, end: number): any;
22 | fail(value?: string): any;
23 | strictEqual(a: any, b: any): any;
24 | eql(value: any): any;
25 | equal(value: any): any;
26 | exist(value: any): any;
27 | above(number: number): any;
28 | below(number: number): any;
29 | ownProperty(name: string): any;
30 | match(reg: RegExp): any;
31 | length(value: number): any;
32 | instanceof(value: Function): any;
33 | instanceOf(value: Function): any;
34 | have: any;
35 | and: any;
36 | property(...name:string[]): any;
37 | keys(...keys:string[]): any;
38 | lengthOf(value: number): any;
39 | a(name: string): any;
40 | status(code: number): any;
41 | header(field: string, value?: any): any;
42 | }
43 |
44 | declare var should: any;
--------------------------------------------------------------------------------
/socket.io.d.ts:
--------------------------------------------------------------------------------
1 | /*
2 | Example:
3 |
4 | /// SERVER
5 |
6 | import sio = module("socket.io");
7 | import http = module("http");
8 |
9 | var httpServer = http.createServer(app);
10 |
11 | var io = sio.listen(httpServer);
12 | io.sockets.on('connection', function (socket: sio.Socket) {
13 | socket.emit('news', { hello: 'world' });
14 | socket.on('my other event', function (data) {
15 | console.log(data);
16 | });
17 | });
18 |
19 | httpServer.listen(app.get('port'), function () {
20 |
21 | /// CLIENT
22 |
23 |
24 |
31 | {% endblock %}
32 |
33 | */
34 |
35 | ///
36 |
37 | declare module "socket.io" {
38 | export var version : string;
39 | export var protocol: number;
40 | export var clientVersion : string;
41 | export function listen(server : any, options? : ManagerOptions, fn?) : Manager;
42 |
43 | interface SocketEmitter {
44 | }
45 |
46 | export interface Manager {
47 | constructor (server, options : ManagerOptions);
48 | server : any;
49 | namespaces;
50 | sockets : SocketNamespace;
51 | settings : ManagerOptions;
52 | store;
53 | log;
54 | static;
55 | get(key);
56 | set(key, value);
57 | enable(key);
58 | disable(key);
59 | enabled(key);
60 | disabled(key);
61 | configure(env, fn);
62 | //initStore();
63 | //onHandshake(id, data);
64 | //onConnect(id);
65 | //onOpen(id);
66 | //onDispatch(room, packet, volatile, exceptions);
67 | //onJoin(id, name);
68 | //onLeave(id, room);
69 | //onClose(id);
70 | //onClientDispatch(id, packet);
71 | //onClientMessage(id, packet);
72 | //onClientDisconnect(id, reason);
73 | //onDisconnect(id, reason);
74 | //handleRequest(req, res);
75 | //handleUpgrade(req, socket, head);
76 | //handleHTTPRequest(data, req, res);
77 | //handleClient(data, req);
78 | //generateId();
79 | //handleHandshake(data, req, res);
80 | //handshakeData(data);
81 | //verifyOrigin(request);
82 | //handlePacket(sessid, packet);
83 | //authorize(data, fn);
84 | //transports(data);
85 | //checkRequest(req);
86 | of(nsp);
87 | //garbageCollection();
88 | }
89 |
90 | export interface SocketNamespace extends EventEmitter {
91 | manager;
92 | name;
93 | sockets;
94 | auth: boolean;
95 | clients(room) : any[];
96 | log;
97 | store;
98 | json : boolean;
99 | volatile: boolean;
100 | in(room) : SocketNamespace;
101 | to(room) : SocketNamespace;
102 | except(id) : SocketNamespace;
103 | //setFlags(): SocketNamespace;
104 | //packet(packet): SocketNamespace;
105 | send(data: any): SocketNamespace;
106 | socket(sid, readable?);
107 | authorization(fn): SocketNamespace;
108 |
109 | // Events
110 | on(event: string, listener: Function): SocketNamespace;
111 | on(event: 'connection', listener: (err: Error, socket: Socket) => void ): SocketNamespace;
112 | }
113 |
114 | export interface Socket extends EventEmitter {
115 | id;
116 | namespace : SocketNamespace;
117 | manager : Manager;
118 | disconnected : boolean;
119 | ackPackets: number;
120 | acks: any;
121 | readable: boolean;
122 | store;
123 | handshake;
124 | transport;
125 | log: boolean;
126 | json: boolean;
127 | volatile: Socket;
128 | broadcast : Socket;
129 | in(room) : SocketNamespace;
130 | to(room) : SocketNamespace;
131 | //setFlags();
132 | //onDisconnect(reason)
133 | join(name, fn) : Socket;
134 | leave(name, fn) : Socket;
135 | //packet(packet);
136 | //dispatch(packet, volatile);
137 | set(key, value, fn) : Socket;
138 | get(key, fn) : Socket;
139 | has(key, fn) : Socket;
140 | del(key, fn) : Socket;
141 | disconnect() : Socket;
142 | send(data, fn) : Socket;
143 | emit(name, ...arguments: any[]): Socket;
144 |
145 | // Events
146 | on(event: string, callback: Function):Socket;
147 | on(event: 'disconnect', callback: (socket: Socket) => void):Socket;
148 |
149 | }
150 |
151 | export interface StoreClient {
152 | store : Store;
153 | id;
154 |
155 | //get(key, fn);
156 | //set(key, value, fn);
157 | //has(key, fn);
158 | //del(key, fn);
159 | //destroy(expiration);
160 | }
161 |
162 | export interface Store extends EventEmitter {
163 | constructor (options);
164 | client(id) : StoreClient;
165 | destroyClient(id, expiration);
166 | destroy(expiration);
167 |
168 | //publish();
169 | //subscribe();
170 | //unsubscribe();
171 | }
172 |
173 | export interface MemoryStore extends Store { }
174 | export interface RedisStore extends Store {
175 | constructor (opts: RedisStoreOptions);
176 | }
177 |
178 | export interface Transport {
179 | }
180 |
181 | export interface Static {
182 | }
183 |
184 | export interface parser {
185 | }
186 |
187 | export interface RedisStoreOptions {
188 | nodeId?: Function; // (fn) gets an id that uniquely identifies this node
189 | redis?: Function; // (fn) redis constructor, defaults to redis
190 | redisPub?: any; // (object) options to pass to the pub redis client
191 | redisSub?: any; // (object) options to pass to the sub redis client
192 | redisClient?: any; // (object) options to pass to the general redis client
193 | pack?: Function; // (fn) custom packing, defaults to JSON or msgpack if installed
194 | unpack?: Function; // (fn) custom packing, defaults to JSON or msgpack if installed
195 | }
196 |
197 | export interface ManagerOptions {
198 | origins?; // : '*:*'
199 | log?; // : true
200 | store? : Store; // : new MemoryStore;
201 | logger?; // : new Logger
202 | static?;// : new Static(this)
203 | heartbeats?;// : true
204 | resource?;// : '/socket.io'
205 | transports?;// : defaultTransports
206 | authorization?;//: false
207 | blacklist?;//: ['disconnect']
208 | //'log level'?;//: 3
209 | //'log colors'?;//: tty.isatty(process.stdout.fd)
210 | //'close timeout'?;//: 60
211 | //'heartbeat interval'?;//: 25
212 | //'heartbeat timeout'?;//: 60
213 | //'polling duration'?;//: 20
214 | //'flash policy server'?;//: true
215 | //'flash policy port'?;//: 10843
216 | //'destroy upgrade'?;//: true
217 | //'destroy buffer size'?;//: 10E7
218 | //'browser client'?;//: true
219 | //'browser client cache'?;//: true
220 | //'browser client minification'?;//: false
221 | //'browser client etag'?;//: false
222 | //'browser client expires'?;//: 315360000
223 | //'browser client gzip'?;//: false
224 | //'browser client handler'?;//: false
225 | //'client store expiration'?;//: 15
226 | //'match origin protocol'?;//: false
227 | }
228 | }
--------------------------------------------------------------------------------
/sprintf.d.ts:
--------------------------------------------------------------------------------
1 | // https://npmjs.org/package/sprintf
2 |
3 | declare module "sprintf" {
4 | export function sprintf(fmt: string, ...args: any[]): string;
5 | export function vsprintf(fmt: string, args: any[]): string;
6 | }
--------------------------------------------------------------------------------
/superagent.d.ts:
--------------------------------------------------------------------------------
1 | declare module "superagent" {
2 | module superagent {
3 | interface Response {
4 | text: string;
5 | body: any;
6 | files: any;
7 | res: any;
8 | header: any;
9 | type: string;
10 | charset: string;
11 | status: number;
12 | statusType: number;
13 | info: boolean;
14 | ok: boolean;
15 | redirect: boolean;
16 | clientError: boolean;
17 | serverError: boolean;
18 | error: any;
19 | accepted: boolean;
20 | noContent: boolean;
21 | badRequest: boolean;
22 | unauthorized: boolean;
23 | notAcceptable: boolean;
24 | notFound: boolean;
25 | forbidden: boolean;
26 | get(header: string): string;
27 | }
28 |
29 | interface Request {
30 | attach(field: string, file: string, filename: string): Request;
31 | redirects(n: number): Request;
32 | part(): Request;
33 | set(field: string, val: string): Request;
34 | set(field: Object): Request;
35 | get(field: string): string;
36 | type(val: string): Request;
37 | query(val: Object): Request;
38 | send(data: string): Request;
39 | send(data: Object): Request;
40 | write(data: string, encoding: string): boolean;
41 | write(data: NodeBuffer, encoding: string): boolean;
42 | pipe(stream: WritableStream, options?: Object): WritableStream;
43 | buffer(val: boolean): Request;
44 | timeout(ms: number): Request;
45 | clearTimeout(): Request;
46 | abort(): void;
47 | auth(user: string, name: string): Request;
48 | field(name: string, val: string): Request;
49 | end(callback?: (err: Error, res: Response) => void): Request;
50 | }
51 |
52 | interface Agent {
53 | get(url: string, callback?: (err: Error, res: Response) => void): Request;
54 | post(url: string, callback?: (err: Error, res: Response) => void): Request;
55 | put(url: string, callback?: (err: Error, res: Response) => void): Request;
56 | head(url: string, callback?: (err: Error, res: Response) => void): Request;
57 | del(url: string, callback?: (err: Error, res: Response) => void): Request;
58 | options(url: string, callback?: (err: Error, res: Response) => void): Request;
59 | trace(url: string, callback?: (err: Error, res: Response) => void): Request;
60 | copy(url: string, callback?: (err: Error, res: Response) => void): Request;
61 | lock(url: string, callback?: (err: Error, res: Response) => void): Request;
62 | mkcol(url: string, callback?: (err: Error, res: Response) => void): Request;
63 | move(url: string, callback?: (err: Error, res: Response) => void): Request;
64 | propfind(url: string, callback?: (err: Error, res: Response) => void): Request;
65 | proppatch(url: string, callback?: (err: Error, res: Response) => void): Request;
66 | unlock(url: string, callback?: (err: Error, res: Response) => void): Request;
67 | report(url: string, callback?: (err: Error, res: Response) => void): Request;
68 | mkactivity(url: string, callback?: (err: Error, res: Response) => void): Request;
69 | checkout(url: string, callback?: (err: Error, res: Response) => void): Request;
70 | merge(url: string, callback?: (err: Error, res: Response) => void): Request;
71 | //m-search(url: string, callback?: (err: Error, res: Response) => void): Request;
72 | notify(url: string, callback?: (err: Error, res: Response) => void): Request;
73 | subscribe(url: string, callback?: (err: Error, res: Response) => void): Request;
74 | unsubscribe(url: string, callback?: (err: Error, res: Response) => void): Request;
75 | patch(url: string, callback?: (err: Error, res: Response) => void): Request;
76 | parse(fn: Function): Request;
77 | }
78 | }
79 |
80 | function superagent(): superagent.Agent;
81 |
82 | export = superagent;
83 | }
--------------------------------------------------------------------------------
/supertest.d.ts:
--------------------------------------------------------------------------------
1 | ///
2 |
3 | declare module "supertest"
4 | {
5 | import superagent = require('superagent');
6 |
7 | module supertest {
8 | interface Test extends superagent.Request {
9 | url: string;
10 | serverAddress(app: any, path: string): string;
11 | expect(status: number, callback?: (err: Error, res: superagent.Response) => void): Test;
12 | expect(status: number, body: string, callback?: (err: Error, res: superagent.Response) => void): Test;
13 | expect(body: string, callback?: (err: Error, res: superagent.Response) => void): Test;
14 | expect(body: RegExp, callback?: (err: Error, res: superagent.Response) => void): Test;
15 | expect(body: Object, callback?: (err: Error, res: superagent.Response) => void): Test;
16 | expect(field: string, val: string, callback?: (err: Error, res: superagent.Response) => void): Test;
17 | expect(field: string, val: RegExp, callback?: (err: Error, res: superagent.Response) => void): Test;
18 | }
19 |
20 | interface SuperTest {
21 | get(url: string): Test;
22 | post(url: string): Test;
23 | put(url: string): Test;
24 | head(url: string): Test;
25 | del(url: string): Test;
26 | options(url: string): Test;
27 | trace(url: string): Test;
28 | copy(url: string): Test;
29 | lock(url: string): Test;
30 | mkcol(url: string): Test;
31 | move(url: string): Test;
32 | propfind(url: string): Test;
33 | proppatch(url: string): Test;
34 | unlock(url: string): Test;
35 | report(url: string): Test;
36 | mkactivity(url: string): Test;
37 | checkout(url: string): Test;
38 | merge(url: string): Test;
39 | //m-search(url: string): Test;
40 | notify(url: string): Test;
41 | subscribe(url: string): Test;
42 | unsubscribe(url: string): Test;
43 | patch(url: string): Test;
44 | }
45 | }
46 |
47 | function supertest(app: any): supertest.SuperTest;
48 |
49 | export = supertest;
50 | }
--------------------------------------------------------------------------------
/swig.d.ts:
--------------------------------------------------------------------------------
1 | declare module "swig" {
2 | export function init(options: Options): void;
3 | export function compileFile(filepath: string): any;
4 | export function compile(source: string, options?: Options): any;
5 |
6 | export interface Options {
7 | allowErrors?: bool;//: false,
8 | autoescape?: bool;//: true,
9 | cache?: bool;//: true,
10 | encoding?: string;//: 'utf8',
11 | filters?: any;//: filters,
12 | root?: string;//: '/',
13 | tags?: any;//: tags,
14 | extensions?: any;//: {},
15 | tzOffset?: number;//: 0
16 | }
17 | }
--------------------------------------------------------------------------------
/swiz.d.ts:
--------------------------------------------------------------------------------
1 | declare module "swiz" {
2 | export class Cidr {
3 | constructor(x:string, y?:string);
4 | isInCIDR(x:any):bool;
5 | }
6 |
7 | export class Valve {
8 | constructor(schema:IValveSchema, baton?:any);
9 | setSchema(schema:IValveSchema):Valve;
10 | addFinalValidator(func:(obj:any, callback:(err, cleaned) => void) => void):Valve;
11 | addChainValidator(name:string, description:string, func:(value:any, callback:(err, cleaned) => void) => void):void;
12 | check(obj:any, options:ICheckOptions, callback:(err:any, cleaned:any) => void);
13 | check(obj:any, callback:(err:any, cleaned:any) => void);
14 | checkUpdate(existing:any, obj:any, callback:(err:any, cleaned:any) => void);
15 | help(schema:IValveSchema):any;
16 | }
17 |
18 | export interface ICheckOptions {
19 | strict? : bool;
20 | }
21 |
22 | interface IValveSchema {
23 | [index: string] : IValveSchemaMember;
24 | }
25 |
26 | interface IValveSchemaMember {}
27 |
28 | interface IValveSchemaMemberArray extends IValveSchemaMember{
29 | [index: string] : IValveSchemaMember;
30 | }
31 |
32 | export function Chain():IChain;
33 |
34 | export function chain():IChain;
35 |
36 | interface IChain extends IValveSchemaMember {
37 | getValidatorPos(name:string) : number;
38 | hasValidator(name:string) : number;
39 | getValidatorAtPos(pos:number) : IValidator;
40 | isUnique() : IChain;
41 | toUnique() : IChain;
42 | notIPBlacklisted() : IChain;
43 | isCIDR() : IChain;
44 | isEmail() : IChain;
45 | isUrl() : IChain;
46 | isAddressPair() : IChain;
47 | isIP() : IChain;
48 | isIPv4() : IChain;
49 | isIPv6() : IChain;
50 | isHostnameOrIp() : IChain;
51 | isAllowedFQDNOrIP(blacklist?:string[]) : IChain;
52 | isHostname() : IChain;
53 | isAlpha() : IChain;
54 | isAlphanumeric() : IChain;
55 | isNumeric() : IChain;
56 | isInt() : IChain;
57 | isLowercase() : IChain;
58 | isUppercase() : IChain;
59 | isDecimal() : IChain;
60 | isFloat() : IChain;
61 | notNull() : IChain;
62 | isNull() : IChain;
63 | notEmpty() : IChain;
64 | equals(arg:any) : IChain;
65 | contains(arg:any): IChain;
66 | notContains(arg): IChain;
67 | notIn(values:any[], caseSensitive?:bool): IChain;
68 | regex(pattern:string, modifiers);
69 | is(pattern:string, modifiers?:string): IChain;
70 | notRegex(pattern:string, modifiers?:string): IChain;
71 | not(pattern:string, modifiers:string) : IChain;
72 | len(min:number, max?:number): IChain;
73 | numItems(min:number, max:number): IChain;
74 | toFloat(): IChain;
75 | toInt(): IChain;
76 | toBoolean(): IChain;
77 | toBooleanStrict(): IChain;
78 | entityDecode(): IChain;
79 | entityEncode(): IChain;
80 | trim(chars?:string): IChain;
81 | ltrim(chars?:string): IChain;
82 | rtrim(chars:string): IChain;
83 | ifNull(replace:string): IChain;
84 | xss(is_image?:bool) : IChain;
85 | enumerated(map:any) : IChain;
86 | inArray(array:any[]) : IChain;
87 | isString() : IChain;
88 | isBoolean() : IChain;
89 | range(min:any, max:any) : IChain;
90 | optional() : IChain;
91 | isPort() : IChain;
92 | isV1UUID() : IChain;
93 | immutable() : IChain;
94 | updateRequired() : IChain;
95 | isArray(chain:IChain) : IChain;
96 | isHash(keyChain:IChain, valueChain:IChain) : IChain;
97 | rename(target:string) : IChain;
98 | custom(name:string) : IChain;
99 | }
100 |
101 | export function defToValve(def:struct.IObj[]):IValveSchema[];
102 |
103 | export class Swiz {
104 | constructor(defs:struct.IObj[], options?:ISwizOptions);
105 | buildObject(obj:any, callback:(err:any, result:any) => void):void;
106 | buildObjectSync(obj:any):any;
107 | serializeJson(obj:any):string;
108 | serializeXml(obj:any):string;
109 | deserializeXml(xml:string):any;
110 | serialize(mode:SERIALIZATION, version:number, obj: ISerializable, callback:(err:any, result:string) => void);
111 | serializeForPagination(mode:SERIALIZATION, array:any[], metadata:any, callback:(err:any, result:string) => void);
112 | deserialize(mode:SERIALIZATION, version:number, raw:string, callback:(err:any, result:any) => void);
113 | getFieldDefinition(stype:string, name:string):struct.IField;
114 | }
115 |
116 | export interface ISerializable {
117 | getSerializerType() : string;
118 | }
119 |
120 | export interface ISwizOptions {
121 | stripNulls?: bool;
122 | stripSerializerType?: bool;
123 | for? : string;
124 | }
125 |
126 | interface IValidator {
127 | name: string;
128 | func(value, baton, callback) : void;
129 | help: string;
130 | }
131 |
132 | export function stripSerializerTypes(obj:any):any;
133 |
134 | export module struct
135 | {
136 | export function Obj(name:string, options?:IObjOptions):IObj;
137 | export function Field(name:string, options?:IFieldOptions):IField;
138 | export function coerce(value:any, coerceTo:string):any;
139 |
140 | interface IObj {
141 | name : string;
142 | options : IObjOptions;
143 | singular : string;
144 | plural : string;
145 | fields : IField[];
146 | }
147 |
148 | interface IField {
149 | name : string;
150 | options : IFieldOptions;
151 | src : string;
152 | singular : string;
153 | plural : string;
154 | desc? : string;
155 | val? : IChain;
156 | attribute : bool;
157 | enumerated : bool;
158 | ignorePublic : bool;
159 | filterFrom : string[];
160 | coerceTo :any;
161 | }
162 |
163 | export interface IObjOptions {
164 | singular? : string;
165 | plural? : string;
166 | fields? : IField[];
167 | }
168 |
169 | export interface IFieldOptions {
170 | src? : string;
171 | singular? : string;
172 | plural? : string;
173 | desc? : string;
174 | val? : IChain;
175 | attribute? : bool;
176 | enumerated? : any;
177 | ignorePublic? : bool;
178 | filterFrom? : string[];
179 | coerceTo? : string;
180 | }
181 | }
182 |
183 | export enum SERIALIZATION {
184 | SERIALIZATION_JSON,
185 | SERIALIZATION_XML
186 | }
187 | }
188 |
--------------------------------------------------------------------------------
/teechart.d.ts:
--------------------------------------------------------------------------------
1 | /**
2 | * TeeChart(tm) for TypeScript
3 | *
4 | * v1.3 October 2012
5 | * Copyright(c) 2012 by Steema Software SL. All Rights Reserved.
6 | * http://www.steema.com
7 | *
8 | * Licensed with commercial and non-commercial attributes,
9 | * specifically: http://www.steema.com/licensing/html5
10 | *
11 | * TypeScript is a Microsoft product: www.typescriptlang.org
12 | *
13 | */
14 |
15 | /**
16 | * @author Steema Software
17 | * @version 1.3
18 | */
19 |
20 |
21 | ///
22 |
23 | module Tee {
24 |
25 | interface IPoint {
26 | x: number;
27 | y: number;
28 | }
29 |
30 | interface IRectangle {
31 | x: number;
32 | y: number;
33 | width: number;
34 | height: number;
35 |
36 | contains(point: IPoint): bool;
37 | }
38 |
39 | interface ITool {
40 | active: bool;
41 | chart: IChart;
42 |
43 | mousedown(event): bool;
44 | mousemove(event): bool;
45 | clicked(p:IPoint): bool;
46 | draw(): void;
47 | }
48 |
49 | interface IGradient {
50 | chart: IChart;
51 | visible: bool;
52 |
53 | colors: string[];
54 | direction: string;
55 | stops: number[];
56 | offset: IPoint;
57 | }
58 |
59 | interface IShadow {
60 | chart: IChart;
61 | visible: bool;
62 | blur:number;
63 | color: string;
64 | width:number;
65 | height:number;
66 | }
67 |
68 | interface IStroke {
69 | chart: IChart;
70 | fill: string;
71 | size: number;
72 | join: string;
73 | cap: string;
74 | dash: number[];
75 | gradient: IGradient;
76 | }
77 |
78 | interface IFont {
79 | chart: IChart;
80 | style: string;
81 | gradient: IGradient;
82 | fill: string;
83 | stroke: IStroke;
84 | shadow: IShadow;
85 | textAlign: string;
86 | baseLine: string;
87 |
88 | getSize():number;
89 | setSize(size:number):void;
90 | }
91 |
92 | interface IImage {
93 | url: string;
94 | chart: IChart;
95 | visible: bool;
96 | }
97 |
98 | interface IFormat {
99 | font: IFont;
100 | gradient: IGradient;
101 | shadow: IShadow;
102 | stroke: IStroke;
103 | round: IPoint;
104 | transparency: number;
105 | image: IImage;
106 | fill: string;
107 |
108 | textHeight(text:string): number;
109 | textWidth(text:string): number;
110 | drawText(bounds:IRectangle, text:string);
111 | rectangle(x:number, y:number, width:number, height:number);
112 | poligon(points:IPoint[]);
113 | ellipse(x:number, y:number, width:number, height:number);
114 | }
115 |
116 | interface IMargins {
117 | left: number;
118 | top: number;
119 | right: number;
120 | bottom: number;
121 | }
122 |
123 | interface IAnnotation extends ITool {
124 | position: IPoint;
125 | margins: IMargins;
126 | items: IAnnotation[];
127 | bounds: IRectangle;
128 | visible: bool;
129 | transparent: bool;
130 | text: string;
131 | format: IFormat;
132 |
133 | add(text: string): IAnnotation;
134 | resize(): void;
135 | clicked(point: IPoint): bool;
136 | draw(): void;
137 | }
138 |
139 | interface IPanel {
140 | format: IFormat;
141 | transparent: bool;
142 | margins: IMargins;
143 | }
144 |
145 | interface ITitle extends IAnnotation {
146 | expand: bool;
147 | padding: number;
148 | transparent: bool;
149 | }
150 |
151 | interface IPalette {
152 | colors: string[];
153 |
154 | get(index: number): string;
155 | }
156 |
157 | interface IArrow extends IFormat {
158 | length: number;
159 | underline: bool;
160 | }
161 |
162 | interface IMarks extends IAnnotation {
163 | arrow: IArrow;
164 | series: ISeries;
165 |
166 | style: string;
167 |
168 | drawEvery: number;
169 | visible: bool;
170 | }
171 |
172 | interface ISeriesData {
173 | values: number[];
174 | labels: string[];
175 | source: any;
176 | }
177 |
178 | interface ICursor {
179 | cursor: string;
180 | }
181 |
182 | interface ISeries {
183 | data: ISeriesData;
184 | marks: IMarks;
185 |
186 | yMandatory: bool;
187 | horizAxis: string;
188 | vertAxis: string;
189 |
190 | format: IFormat;
191 | hover: IFormat;
192 |
193 | visible: bool;
194 |
195 | cursor: ICursor;
196 | over: number;
197 |
198 | palette: IPalette;
199 | colorEach: string;
200 |
201 | useAxes: bool;
202 | decimals: number;
203 |
204 | title: string;
205 |
206 | //refresh(failure: function): void;
207 |
208 | toPercent(index: number): string;
209 | markText(index: number): string;
210 |
211 | valueText(index: number): string;
212 |
213 | associatedToAxis(axis: IAxis): bool;
214 |
215 | bounds(rectangle: IRectangle): void;
216 |
217 | calc(index: number, position: IPoint): void;
218 |
219 | clicked(position: IPoint): number;
220 |
221 | minXValue(): number;
222 | maxXValue(): number;
223 |
224 | minYValue(): number;
225 | maxYValue(): number;
226 |
227 | count(): number;
228 |
229 | addRandom(count: number, range?: number, x?: bool): ISeries;
230 |
231 |
232 | }
233 |
234 | interface IAxisLabels {
235 | chart: IChart;
236 | format: IFormat;
237 | decimals: number;
238 | padding: number;
239 | separation: number; // %
240 | visible: bool;
241 | rotation: number;
242 | alternate: bool;
243 | maxWidth: number;
244 |
245 | labelStyle: string;
246 | dateFormat: string;
247 |
248 | getLabel(value: number): string;
249 | width(value: number): number;
250 |
251 | }
252 |
253 | interface IGrid {
254 | chart: IChart;
255 | format: IFormat;
256 | visible: bool;
257 | lineDash: bool;
258 | }
259 |
260 | interface ITicks {
261 | chart: IChart;
262 | stroke: IStroke;
263 | visible: bool;
264 | length: number;
265 | }
266 |
267 | interface IMinorTicks extends ITicks {
268 | count: number;
269 | }
270 |
271 | interface IAxisTitle extends IAnnotation {
272 | padding: number;
273 | transparent: bool;
274 | }
275 |
276 | interface IAxis {
277 | chart: IChart;
278 | visible: bool;
279 | inverted: bool;
280 |
281 | horizontal: bool; // readonly
282 | otherSize: bool; // readonly
283 | bounds: IRectangle; // readonly?
284 |
285 | position: number;
286 | format: IFormat;
287 | custom: bool; // readonly
288 |
289 | grid: IGrid;
290 | labels: IAxisLabels;
291 | ticks: ITicks;
292 | minorTicks: IMinorTicks;
293 | innerTicks: ITicks;
294 |
295 | title: IAxisTitle;
296 |
297 | automatic: bool;
298 | minimum: number;
299 | maximum: number;
300 | increment: number;
301 | log: bool;
302 |
303 | startPos: number;
304 | endPos: number;
305 |
306 | start: number; // %
307 | end: number; // %
308 |
309 | axisSize: number;
310 |
311 | scale: number;
312 | increm: number;
313 |
314 | calc(value: number): number;
315 | fromPos(position: number): number;
316 | fromSize(size: number): number;
317 |
318 | hasAnySeries(): bool;
319 | scroll(delta: number): void;
320 | setMinMax(minimum: number, maximum: number): void;
321 | }
322 |
323 | interface IAxes {
324 | chart: IChart;
325 | visible: bool;
326 |
327 | left: IAxis;
328 | top: IAxis;
329 | right: IAxis;
330 | bottom: IAxis;
331 |
332 | items: IAxis[];
333 |
334 | add(horizontal: bool, otherSide: bool): IAxis;
335 | //each(f: function): void;
336 | }
337 |
338 | interface ISymbol {
339 | chart: IChart;
340 | format: IFormat;
341 | width: number;
342 | height: number;
343 | padding: number;
344 | visible: bool;
345 | }
346 |
347 | interface ILegend {
348 | chart: IChart;
349 |
350 | transparent: bool;
351 |
352 | format: IFormat;
353 | title: IAnnotation;
354 |
355 | bounds: IRectangle;
356 | position: string;
357 | visible: bool;
358 | inverted: bool;
359 | padding: number;
360 | align: number;
361 |
362 | fontColor: bool;
363 |
364 | dividing: IStroke;
365 | over: number;
366 | symbol: ISymbol;
367 |
368 | itemHeight: number;
369 | innerOff: number;
370 |
371 | legendStyle: string;
372 | textStyle: string;
373 |
374 | availRows(): number;
375 | itemsCount(): number;
376 | totalWidth(): number;
377 | showValues(): bool;
378 | itemText(series: ISeries, index: number): string;
379 | isVertical(): bool;
380 | }
381 |
382 | interface IScroll {
383 | chart: IChart;
384 | active: bool;
385 | enabled: bool;
386 | direction: string;
387 | mouseButton: number;
388 |
389 | position: IPoint;
390 | }
391 |
392 | interface ISeriesList {
393 | chart: IChart;
394 | items: ISeries[];
395 |
396 | anyUsesAxes(): bool;
397 | clicked(position: IPoint): bool;
398 | //each(f: function): void;
399 | firstVisible(): ISeries;
400 |
401 | }
402 |
403 | interface ITools {
404 | chart: IChart;
405 | items: ITool[];
406 |
407 | add(tool: ITool): ITool;
408 | }
409 |
410 | interface IWall {
411 | format: IFormat;
412 | visible: bool;
413 | bounds: IRectangle;
414 | }
415 |
416 | interface IWalls {
417 | visible: bool;
418 | left: IWall;
419 | right: IWall;
420 | bottom: IWall;
421 | back: IWall;
422 | }
423 |
424 | interface IZoom {
425 | chart: IChart;
426 | active: bool;
427 | direction: string;
428 | enabled: bool;
429 | mouseButton: number;
430 | format: IFormat;
431 |
432 | reset(): void;
433 | }
434 |
435 | interface IChart {
436 | addSeries(series:ISeries): ISeries;
437 | draw(context?:CanvasRenderingContext2D);
438 | }
439 |
440 | // SERIES
441 |
442 | interface ICustomBar extends ISeries {
443 | sideMargins: number;
444 | useOrigin: bool;
445 | origin: number;
446 |
447 | offset: number;
448 | barSize: number;
449 | barStyle: string;
450 |
451 | stacked: string;
452 | }
453 |
454 | interface ISeriesPointer {
455 | chart: IChart;
456 | format: IFormat;
457 | visible: bool;
458 | colorEach: bool;
459 | style: string;
460 | width: number;
461 | height: number;
462 | }
463 |
464 | interface ICustomSeries extends ISeries {
465 | pointer: ISeriesPointer;
466 |
467 | stacked: string;
468 | stairs: bool;
469 | }
470 |
471 | interface ILine extends ICustomSeries {
472 | smooth: number;
473 | }
474 |
475 | interface ISmoothLine extends ILine {
476 | smooth: number;
477 | }
478 |
479 | interface IArea extends ISeries {
480 | useOrigin: bool;
481 | origin: number;
482 | }
483 |
484 | interface IPie extends ISeries {
485 | donut: number;
486 | rotation: number;
487 | sort: string;
488 | orderAscending: bool;
489 | explode: number[];
490 | concentric: bool;
491 |
492 | calcPos(angle: number, position: IPoint): void;
493 | }
494 |
495 | interface IBubbleData extends ISeriesData {
496 | radius: number[];
497 | }
498 |
499 | interface IBubble extends ICustomSeries {
500 | data: IBubbleData;
501 | }
502 |
503 | interface IGanttData extends ISeriesData {
504 | start: number[];
505 | x: number[];
506 | end: number[];
507 | }
508 |
509 | interface IGantt extends ISeries {
510 | data: IGanttData;
511 | dateFormat: string;
512 | colorEach: string;
513 | height: number;
514 | margin: IPoint;
515 |
516 | add(index: number, label: string, start: number, end: number): void;
517 | bounds(index: number, rectangle: IRectangle): void;
518 | }
519 |
520 | interface ICandleData extends ISeriesData {
521 | open: number[];
522 | close: number[];
523 | high: number[];
524 | low: number[];
525 | }
526 |
527 | interface ICandle extends ICustomSeries {
528 | data: ICandleData;
529 | higher: IFormat;
530 | lower: IFormat;
531 | style: string;
532 | }
533 |
534 | // TOOLS
535 |
536 | interface IDragTool extends ITool {
537 | series: ISeries;
538 | }
539 |
540 | interface ICursorTool extends ITool {
541 | direction: string;
542 | size: IPoint;
543 |
544 | followMouse: bool;
545 | dragging: number;
546 |
547 | format: IFormat;
548 |
549 | horizAxis: IAxis;
550 | vertAxis: IAxis;
551 |
552 | render: string;
553 |
554 | over(point: IPoint): bool;
555 | setRender(render: string): void;
556 | }
557 |
558 | interface IToolTip extends IAnnotation {
559 | animated: number;
560 | autoHide: bool;
561 | autoRedraw: bool;
562 | currentSeries: ISeries;
563 | currentIndex: number;
564 | delay: number;
565 |
566 | hide(): void;
567 | refresh(series: ISeries, index: number): void;
568 | }
569 |
570 | declare class Point implements IPoint {
571 | public x:number;
572 | public y:number;
573 | }
574 |
575 | declare class Chart implements IChart {
576 | //public aspect: IAspect;
577 |
578 | public axes: IAxes;
579 | public footer: ITitle;
580 | public legend: ILegend;
581 | public panel: IPanel;
582 | public scroll: IScroll;
583 | public series: ISeriesList;
584 | public title: ITitle;
585 | public tools: ITools;
586 | public walls: IWalls;
587 | public zoom: IZoom;
588 |
589 | public bounds: IRectangle;
590 | public canvas: HTMLCanvasElement;
591 | public chartRect: IRectangle;
592 | public palette: IPalette;
593 |
594 | constructor(canvas: string);
595 | addSeries(series: ISeries): ISeries;
596 | getSeries(index: number): ISeries;
597 | removeSeries(series:ISeries): void;
598 |
599 | draw(context?:CanvasRenderingContext2D);
600 | toImage(image: HTMLImageElement, format:string, quality:number): void;
601 | }
602 |
603 | // SERIES
604 |
605 | declare var Line: {
606 | prototype: ILine;
607 | new(values?:number[]): ILine;
608 | }
609 |
610 | declare var PointXY: {
611 | prototype: ICustomSeries;
612 | new(values?:number[]): ICustomSeries;
613 | }
614 |
615 | declare var Area: {
616 | prototype: IArea;
617 | new(values?:number[]): IArea;
618 | }
619 |
620 | declare var HorizArea: {
621 | prototype: IArea;
622 | new(values?:number[]): IArea;
623 | }
624 |
625 | declare var Bar: {
626 | prototype: ICustomBar;
627 | new(values?:number[]): ICustomBar;
628 | }
629 |
630 | declare var HorizBar: {
631 | prototype: ICustomBar;
632 | new(values?:number[]): ICustomBar;
633 | }
634 |
635 | declare var Pie: {
636 | prototype: IPie;
637 | new(values?:number[]): IPie;
638 | }
639 |
640 | declare var Donut: {
641 | prototype: IPie;
642 | new(values?:number[]): IPie;
643 | }
644 |
645 | declare var Bubble: {
646 | prototype: IBubble;
647 | new(values?:number[]): IBubble;
648 | }
649 |
650 | declare var Gantt: {
651 | prototype: IGantt;
652 | new(values?:number[]): IGantt;
653 | }
654 |
655 | declare var Volume: {
656 | prototype: ICustomBar;
657 | new(values?:number[]): ICustomBar;
658 | }
659 |
660 | declare var Candle: {
661 | prototype: ICandle;
662 | new(values?:number[]): ICandle;
663 | }
664 |
665 | // TOOLS
666 |
667 | declare var CursorTool: {
668 | prototype: ICursorTool;
669 | new(chart?: Chart): ICursorTool;
670 | }
671 |
672 | declare var DragTool: {
673 | prototype: IDragTool;
674 | new(chart?: Chart): IDragTool;
675 | }
676 |
677 | declare var ToolTip: {
678 | prototype: IToolTip;
679 | new(chart?: Chart): IToolTip;
680 | }
681 | }
682 |
--------------------------------------------------------------------------------
/timezone-js.d.ts:
--------------------------------------------------------------------------------
1 | module "timezone-js" {
2 | export var timezone : TimezoneJs;
3 |
4 | export var Date: {
5 | new (timezone?: string): TimezoneJsDate;
6 | new (time: string, timezone?: string): TimezoneJsDate;
7 | new (year?: number, month?: number, day?: number, hour?: number, minute?: number, second?: string, timezone?: string): TimezoneJsDate;
8 | };
9 |
10 | interface TimezoneJsDate extends Date {
11 | setTimezone: (timezone: string) => void;
12 | };
13 |
14 | class TimezoneJs {
15 | zoneFileBasePath: string;
16 | loadingScheme: TimezoneJsLoadingScheme;
17 | loadingSchemes: TimezoneJsLoadingSchemes;
18 |
19 | transport(opts: TimezoneJsOptions): any;
20 | init(opts?: TimezoneJsOptions): any;
21 | };
22 |
23 | interface TimezoneJsOptions {
24 | async?: bool;
25 | success?: (data: string) => any;
26 | error?: (err: Error) => any;
27 | url?: string;
28 | };
29 |
30 | interface TimezoneJsLoadingScheme {
31 | };
32 |
33 | interface TimezoneJsLoadingSchemes {
34 | PRELOAD_ALL: TimezoneJsLoadingScheme;
35 | LAZY_LOAD: TimezoneJsLoadingScheme;
36 | MANUAL_LOAD: TimezoneJsLoadingScheme;
37 | };
38 | }
--------------------------------------------------------------------------------
/twig.d.ts:
--------------------------------------------------------------------------------
1 | declare module "twig" {
2 | export interface Parameters {
3 | id?: any;
4 | ref?: any;
5 | href?: any;
6 | path?: any;
7 | debug?: bool;
8 | trace?: bool;
9 | strict_variables?: bool;
10 | data: any;
11 | }
12 |
13 | interface Template {
14 | }
15 |
16 | interface CompileOptions {
17 | filename: string;
18 | settings: any;
19 | }
20 |
21 | export function twig(params: Parameters): Template;
22 | export function extendFilter(name: string, definition: (left: any, ...params: any[]) => string): void;
23 | export function extendFunction(name: string, definition: (...params: any[]) => string): void;
24 | export function extendTest(name: string, definition: (value: any) => bool): void;
25 | export function extendTag(definition: any): void;
26 | export function compile(markup: string, options: CompileOptions): (context) => any;
27 | export function renderFile(path, options: CompileOptions, fn: (err, result) => void): void;
28 | export function __express(path, options: CompileOptions, fn: (err, result) => void): void;
29 | export function cache(value: bool): void;
30 | }
--------------------------------------------------------------------------------
/underscore.d.ts:
--------------------------------------------------------------------------------
1 | // Underscore 1.4.2
2 |
3 | // http://underscorejs.org
4 | // http://github.com/documentcloud/underscore
5 |
6 | // Collections
7 | declare module "underscore" {
8 | /**
9 | * Iterates over a list of elements, yielding each in turn to an iterator function.
10 | * The iterator is bound to the context object, if one is passed. Each invocation of
11 | * iterator is called with three arguments: (element, index, list). If list is a
12 | * JavaScript object, iterator's arguments will be (value, key, list). Delegates
13 | * to the native forEach function if it exists.
14 | */
15 | export function each(list: T[], iterator: (item: T) => void, context?: any) : void;
16 | export function each(list: T, iterator: (item: any, key: string) => void, context?: any) : void;
17 |
18 | export function forEach(list: T[], iterator: (item: T) => void, context?: any) : void;
19 | export function forEach(list: T, iterator: (item: any, key: any) => void, context?: any) : void;
20 |
21 | export function map(list: T1[], iterator: (item: T1) => T2, context?: any): T2[];
22 | export function collect(list: T1[], iterator: (item: T1) => T2, context?: any): T2[];
23 |
24 | export function reduce(list: T1[], iterator: (memo: T2, num: T1) => T2, memo: T2, context?): T2;
25 | export function inject(list: T1[], iterator: (memo: T2, num: T1) => T2, memo: T2, context?): T2;
26 | export function foldl(list: T1[], iterator: (memo: T2, num: T1) => T2, memo: T2, context?): T2;
27 |
28 |
29 | export function reduceRight(list: T1[], iterator: (memo: T2, num: T1) => T2, memo: T2, context?): T2;
30 | export function foldr(list: T1[], iterator: (memo: T2, num: T1) => T2, memo: T2, context?): T2;
31 |
32 | /**
33 | * Looks through each value in the list, returning the first one that passes a truth test(iterator).The function returns as soon as it finds an acceptable element, and doesn't traverse the entire list.
34 | */
35 | export function find(list: T[], iterator: (item: T) => boolean, context?): T;
36 | export function detect(list: T[], iterator: (item: T) => boolean, context?): T;
37 |
38 | /**
39 | * Looks through each value in the list, returning an array of all the values that pass a truth test (iterator). Delegates to the native filter method, if it exists.
40 | */
41 | export function filter(list: T[], iterator: (item: T) => boolean, context?): T[];
42 | export function select(list: T[], iterator: (item: T) => boolean, context?): T[];
43 |
44 | export function where(list : any[], properties : any) : any[];
45 | export function reject(list : any[], iterator : (item) => boolean, context?) : any[];
46 |
47 | export function all(list : any[], iterator : (item) => boolean, context?) : boolean;
48 | export function every(list : any[], iterator : (item) => boolean, context?) : boolean;
49 |
50 | export function any(list : any[], iterator : (item) => boolean, context?) : boolean;
51 | export function some(list : any[], iterator : (item) => boolean, context?) : boolean;
52 |
53 | export function contains(list : any[], value: any) : boolean;
54 | export function include(list : any[], value: any) : boolean;
55 |
56 | export function invoke(list : any[], methodName: string, ...arguments : any[]) : boolean;
57 | export function invoke(list : any[], method: Function, ...arguments : any[]) : boolean;
58 |
59 | export function pluck(list : any[], propertyName : string) : any[];
60 | export function max(list : any[], iterator : (item) => any, context?) : any;
61 | export function min(list : any[], iterator : (item) => any, context?) : any;
62 |
63 | export function sortBy(list: T[], iterator: (item: T) => any, context?): T[];
64 | export function sortBy(list: any[], iterator: (item) => any, context?): any[];
65 | export function groupBy(list : any[], iterator : (item) => any) : any;
66 | export function countBy(list : any[], iterator : (item) => string) : any;
67 |
68 | export function shuffle(list : any[]) : any[];
69 |
70 | export function toArray(list : any) : any[];
71 | export function size(list : any) : number;
72 |
73 | // Array Functions
74 | export function first(array: T[]): T;
75 | export function first(array: T[], n: number): T[];
76 | export function head(array: T[]): T;
77 | export function head(array: T[], n: number): T[];
78 | export function take(array: T[]): T;
79 | export function take(array: T[], n: number): T[];
80 |
81 | export function initial(array : any[], n? : number) : any[];
82 |
83 | export function last(array : any[]) : any;
84 | export function last(array : any[], n? : number) : any[];
85 |
86 | export function rest(array : any[], index? : number) : any[];
87 |
88 | export function compact(array : any[]) : any[];
89 |
90 | export function flatten(array : any[], shallow?: boolean) : any[];
91 |
92 | export function without(array : any[], ...values: any[]) : any[];
93 | export function without(array : any[], values: any[]) : any[];
94 |
95 | export function union(...arrays : any[][]) : any[];
96 | export function intersection(...arrays : any[][]) : any[];
97 | export function difference(array : any[], ...others : any[][]) : any[];
98 | export function uniq(array : any[], isSorted?: boolean, iterator?: (item) => boolean) : any[];
99 | export function zip(...arrays : any[][]) : any[][];
100 |
101 | export function object(list: any[][]) : any;
102 | export function object(list: any[], values: any[]) : any;
103 |
104 | export function indexOf(list: any[], value: any, isSorted?: boolean) : number;
105 | export function lastIndexOf(list: any[], value: any, isSorted?: boolean) : number;
106 | export function sortedIndex(list: any[], value: any, iterator?: (item) => any) : number;
107 |
108 | export function range(count: number) : number[];
109 | export function range(start : number, stop: number, step?: number) : number[];
110 |
111 | // Function Functions
112 | export function bind(_function : Function, object : any, ...arguments : any[]) : () => any;
113 | export function bindAll(object : any, ... methodNames : any[]) : void;
114 | export function memoize(_function : Function, hashFunction? : (value : any) => any) : any;
115 | export function delay(_function, _wait : number, ...arguments : any[]) : void;
116 | export function defer(_function, ...arguments: any[]) : void;
117 | export function throttle(_function, wait : number) : Function;
118 | export function debounce(_function, wait : number, immediate?) : Function;
119 | export function once(_function : () => any) : () => any;
120 | export function after(count, _function);
121 | export function wrap(_function : Function, wrapper : Function) : Function;
122 | export function compose(functions : Function[]) : Function;
123 |
124 | // Object Functions
125 | export function keys(object: any) : any[];
126 | export function values(object: any) : any[];
127 | export function pairs(object: any) : any[];
128 | export function invert(object: any) : any;
129 |
130 | export function functions(object: any) : string[];
131 | export function methods(object: any) : string[];
132 |
133 | export function extend(destination : any, ...sources: any[]) : any;
134 | export function pick(object : any, ...keys: string[]) : any;
135 | export function omit(object : any, ...keys: string[]) : any;
136 |
137 | export function defaults(object : any, ...defaults: any[]) : any;
138 | export function clone(object : any) : any;
139 |
140 | export function tap(object : any, interceptor : (object: any) => void) : any;
141 | export function has(object : any, key: string) : boolean;
142 | export function isEqual(object : any, key: string) : boolean;
143 | export function isEmpty(object : any) : boolean;
144 | export function isElement(object : any) : boolean;
145 | export function isArray(object : any) : boolean;
146 | export function isObject(object : any) : boolean;
147 | export function isArguments(object : any) : boolean;
148 | export function isFunction(object : any) : boolean;
149 | export function isString(object : any) : boolean;
150 | export function isNumber(object : any) : boolean;
151 | export function isFinite(object : any) : boolean;
152 | export function isBoolean(object : any) : boolean;
153 | export function isDate(object : any) : boolean;
154 | export function isRegExp(object : any) : boolean;
155 | export function isNaN(object : any) : boolean;
156 | export function isNull(object : any) : boolean;
157 | export function isUndefined(object : any) : boolean;
158 |
159 | // Utility Functions
160 | export function noConflict() : any;
161 | export function identity(value: any): any;
162 | export function times(n : number, iterator : (value : any) => void, context?);
163 | export function random(min: number, max: number): number;
164 | export function mixin(object: any) : void;
165 | export function uniqueId(prefix?: string) : string;
166 | export function escape(string: string) : string;
167 | export function result(object: any, property: any) : any;
168 | export function template(templateString: string, data?: any, settings?: any) : string;
169 |
170 | // Chaining Functions
171 | export interface Chain {
172 | // Collection
173 | each(iterator: (item: any) => void, context?: any) : Chain;
174 | each(iterator: (item: any, key: any) => void, context?: any) : Chain;
175 |
176 | forEach(iterator: (item: any) => void, context?: any) : Chain;
177 | forEach(iterator: (item: any, key: any) => void, context?: any) : Chain;
178 |
179 | map(iterator, context?) : Chain;
180 | collect(iterator, context?) : Chain;
181 |
182 | reduce(iterator, memo, context?) : Chain;
183 | inject(iterator, memo, context?) : Chain;
184 | foldl(iterator, memo, context?) : Chain;
185 |
186 |
187 | reduceRight(iterator, memo, context?) : Chain;
188 | foldr(iterator, memo, context?) : Chain;
189 |
190 | find(iterator : (item) => boolean, context?) : Chain;
191 | detect(iterator : (item) => boolean, context?) : Chain;
192 |
193 | filter(iterator : (item) => boolean, context?) : Chain;
194 | select(iterator : (item) => boolean, context?) : Chain;
195 |
196 | where(properties : any) : any[];
197 | reject(iterator : (item) => boolean, context?) : Chain;
198 |
199 | all(iterator : (item) => boolean, context?) : Chain;
200 | every(iterator : (item) => boolean, context?) : Chain;
201 |
202 | any(iterator : (item) => boolean, context?) : Chain;
203 | some(iterator : (item) => boolean, context?) : Chain;
204 |
205 | contains(value: any) : Chain;
206 | include(value: any) : Chain;
207 |
208 | invoke(methodName: string, ...arguments : any[]) : Chain;
209 | invoke(method: Function, ...arguments : any[]) : Chain;
210 |
211 | pluck(propertyName : string) : Chain;
212 | max(iterator : (item) => any, context?) : Chain;
213 | min(iterator : (item) => any, context?) : Chain;
214 |
215 | sortBy(iterator : (item) => any, context?) : Chain;
216 | groupBy(iterator : (item) => any) : Chain;
217 | countBy(iterator : (item) => string) : Chain;
218 |
219 | shuffle() : Chain;
220 |
221 | toArray() : Chain;
222 | size() : Chain;
223 |
224 | // Array
225 | first(n? : number) : Chain;
226 | head(n? : number) : Chain;
227 | take(n? : number) : Chain;
228 |
229 | initial(n? : number) : Chain;
230 |
231 | last(n? : number) : Chain;
232 |
233 | rest(index? : number) : Chain;
234 |
235 | compact() : Chain;
236 |
237 | flatten(shallow?: boolean) : Chain;
238 |
239 | without(...values: any[]) : Chain;
240 | without(values: any[]) : Chain;
241 |
242 | union(...arrays : any[][]) : Chain;
243 | intersection(...arrays : any[][]) : Chain;
244 | difference(...others : any[][]) : Chain;
245 | uniq(isSorted?: boolean, iterator?: (item) => boolean) : Chain;
246 | zip(...arrays : any[][]) : Chain;
247 |
248 | object(values: any[]) : Chain;
249 |
250 | indexOf(value: any, isSorted?: boolean) : Chain;
251 | lastIndexOf(value: any, isSorted?: boolean) : Chain;
252 | sortedIndex(value: any, iterator?: (item) => any) : Chain;
253 |
254 | range() : Chain;
255 | range(stop: number, step?: number) : Chain;
256 |
257 | // Functions
258 | bind(object : any, ...arguments : any[]) : () => Chain;
259 | bindAll(... methodNames : any[]) : Chain;
260 | memoize(hashFunction : (value : any) => any) : Chain;
261 | delay(_wait : number, ...arguments : any[]) : Chain;
262 | defer(...arguments: any[]) : Chain;
263 | throttle(wait : number) : Chain;
264 | debounce(wait : number, immediate?) : Chain;
265 | once() : Chain;
266 | after(_function) : Chain;
267 | wrap(wrapper : Function) : Chain;
268 | compose() : Chain;
269 |
270 | // Object
271 | keys() : Chain;
272 | values() : Chain;
273 | pairs() : Chain;
274 | invert() : Chain;
275 |
276 | functions() : Chain;
277 | methods() : Chain;
278 |
279 | extend(...sources: any[]) : Chain;
280 | pick(...keys: string[]) : Chain;
281 | omit(...keys: string[]) : Chain;
282 |
283 | defaults(...defaults: any[]) : Chain;
284 | clone() : Chain;
285 |
286 | tap(interceptor : (object: any) => void) : Chain;
287 | has(key: string) : Chain;
288 | isEqual(key: string) : Chain;
289 | isEmpty() : Chain;
290 | isElement() : Chain;
291 | isArray() : Chain;
292 | isObject() : Chain;
293 | isArguments() : Chain;
294 | isFunction() : Chain;
295 | isString() : Chain;
296 | isNumber() : Chain;
297 | isFinite() : Chain;
298 | isBoolean() : Chain;
299 | isDate() : Chain;
300 | isRegExp() : Chain;
301 | isNaN() : Chain;
302 | isNull() : Chain;
303 | isUndefined() : Chain;
304 |
305 | // Chaining
306 | value(): any;
307 | }
308 |
309 | export function chain(obj: any): Chain;
310 |
311 | //export function(obj: any) : any;
312 | }
--------------------------------------------------------------------------------
/underscore.string.d.ts:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/soywiz-archive/typescript-node-definitions/c54876702a98b6a8b82f952034dac084028ed895/underscore.string.d.ts
--------------------------------------------------------------------------------
/uuid.d.ts:
--------------------------------------------------------------------------------
1 | ///
2 |
3 | declare module "uuid" {
4 | function v1(options?: v1Options, buffer?: any, offset?: number);
5 | function v4(options?: v4Options, buffer?: any, offset?: number);
6 | function noConflict();
7 | function parse(id, buffer?: any, offset?: number);
8 | function unparse(buffer: any, offset?: number);
9 |
10 |
11 | interface v4Options {
12 | random?: number[];
13 | rng?: any;
14 | }
15 |
16 | interface v1Options {
17 | node: number[];
18 | clockseq: number;
19 | msecs: number;
20 | nsecs: number;
21 | }
22 | }
--------------------------------------------------------------------------------
/watch.d.ts:
--------------------------------------------------------------------------------
1 | ///
2 |
3 | // https://github.com/mikeal/watch
4 |
5 | declare module "watch" {
6 | import fs = module("fs");
7 |
8 | interface Monitor extends EventEmitter {
9 | // event: created
10 | // event: removed
11 | // event: changed
12 |
13 | // export function onCreated(callback, function(f, stat: fs.Stats) { });
14 | // export function onChanged(callback, function(f, curr: fs.Stats, prev: fs.Stats) { });
15 | // export function onRemoved(callback, function(f, stat: fs.Stats) { });
16 | }
17 |
18 | interface Options {
19 | ignoreDotFiles?: bool;
20 | filter?: any;
21 | }
22 |
23 | export function watchTree(root: string, callback: (f, curr : fs.Stats, prev : fs.Stats) => void);
24 | export function watchTree(root: string, options: Options, callback: (f, curr : fs.Stats, prev : fs.Stats) => void);
25 |
26 | export function createMonitor(root: string, callback: (monitor: Monitor) => void);
27 | export function createMonitor(root: string, options: Options, callback: (monitor: Monitor) => void);
28 | }
--------------------------------------------------------------------------------
/winston.d.ts:
--------------------------------------------------------------------------------
1 | declare module "winston" {
2 | function log(level: string, message: string, metadata?: any);
3 | function debug(message: string, metadata?: any);
4 | function info(message: string, metadata?: any);
5 | function warn(message: string, metadata?: any);
6 | function error(message: string, metadata?: any);
7 |
8 | function add(transport: Transport, options: any);
9 | function remove(transport: Transport);
10 |
11 | function profile(name: string);
12 |
13 | function query(options: any, done: (err: any, results: any) => void);
14 |
15 | function stream(options: any): any;
16 |
17 | function handleExceptions(transport: Transport);
18 |
19 | interface Transport {
20 | }
21 | interface Transports {
22 | File: Transport;
23 | Console: Transport;
24 | Loggly: Transport;
25 | }
26 | export var transports: Transports;
27 | export var exitOnError: boolean;
28 | }
--------------------------------------------------------------------------------
/wrench.d.ts:
--------------------------------------------------------------------------------
1 | // https://github.com/ryanmcgrath/wrench-js
2 |
3 | declare module "wrench" {
4 | export function readdirSyncRecursive(baseDir: string): string[];
5 | export function rmdirSyncRecursive(path: string, failSilent?: bool);
6 | export function copyDirSyncRecursive(sourceDir: string, newDirLocation: string, opts: { preserve?: bool; }): void;
7 | export function chmodSyncRecursive(sourceDir: string, filemode: number): void;
8 | export function chownSyncRecursive(sourceDir: string, uid: any, gid: any): void;
9 | export function mkdirSyncRecursivefunction(path: string, mode: number): void;
10 |
11 | export function readdirRecursive(baseDir: string, fn: (err: Error, files: string[]) => void): void;
12 | export function rmdirRecursive(path: string, fn: (err: Error) => void): void;
13 | export function copyDirRecursive(srcDir: string, newDir: string, fn: (err: Error) => void): void;
14 |
15 | export class LineReader {
16 | constructor (filename: string, bufferSize?: number);
17 |
18 | getBufferAndSetCurrentPosition(position: number): number;
19 | hasNextLine(): bool;
20 | getNextLine(): string;
21 | }
22 | }
--------------------------------------------------------------------------------