From 0d0133104dff056cbba9a3677efbdd130175b3ab Mon Sep 17 00:00:00 2001 From: Nicholas Iannone Date: Mon, 8 Aug 2016 19:04:30 -0500 Subject: [PATCH] Tweaks to try and get this working. --- twilio/twilio-tests.ts | 2 ++ twilio/twilio.d.ts | 22 ++++++++++------------ 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/twilio/twilio-tests.ts b/twilio/twilio-tests.ts index 9af07e7c27..f73fcc231b 100644 --- a/twilio/twilio-tests.ts +++ b/twilio/twilio-tests.ts @@ -1,5 +1,7 @@ /// +import twilio = require('twilio'); + var str: string; const client = new twilio.RestClient(str, str); diff --git a/twilio/twilio.d.ts b/twilio/twilio.d.ts index f2600a2ed8..e99e4c508f 100644 --- a/twilio/twilio.d.ts +++ b/twilio/twilio.d.ts @@ -1,17 +1,15 @@ +// Type definitions for twilio +// Project: https://github.com/twilio/twilio-node +// Definitions by: nickiannone +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + /// /// /// import * as Http from 'http'; -/// index.js -/* -export class twilio extends RestClient { - constructor(sid?: string, tkn?: string, options?: ClientOptions); -} -*/ - -export namespace twilio { +declare module twilio { // Composite Classes: //============================== @@ -352,7 +350,7 @@ export namespace twilio { toString(): string; } - export function TwimlResponse(): Node; + function TwimlResponse(): Node; /// webhook.js export interface webhookOptions { @@ -376,10 +374,10 @@ export namespace twilio { // For interop with node middleware chains export interface MiddlewareFunction { (request: Http.ClientRequest, response: Http.ClientResponse, next: MiddlewareFunction): void; } - export function webhook(options?: string | webhookOptions): MiddlewareFunction; + function webhook(options?: string | webhookOptions): MiddlewareFunction; - export function validateRequest(authToken: string, twilioHeader: string, url: string, params?: any): boolean; - export function validateExpressRequest(request: Express.Request, authToken: string, options?: WebhookExpressOptions): boolean; + function validateRequest(authToken: string, twilioHeader: string, url: string, params?: any): boolean; + function validateExpressRequest(request: Express.Request, authToken: string, options?: WebhookExpressOptions): boolean; /// resources/Accounts.js export interface OutgoingCallerIdInstance {