From ffc26fed665ce163e806972fb2c69e73bceb38d0 Mon Sep 17 00:00:00 2001 From: Luke Date: Fri, 10 Jun 2016 12:51:24 -0400 Subject: [PATCH 1/3] add typings --- index.d.ts | 10 ++++++++++ package.json | 1 + 2 files changed, 11 insertions(+) create mode 100644 index.d.ts diff --git a/index.d.ts b/index.d.ts new file mode 100644 index 00000000..9f4e28a0 --- /dev/null +++ b/index.d.ts @@ -0,0 +1,10 @@ +declare module "oauth" { + export class OAuth { + constructor(requestTokenUrl: string, accessTokenUrl: string, applicationConsumerKey: string, applicationSecret: string, oauthVersion: string, something: any, encryption: string); + get(url: string, userToken: string, userSecret: string, callback: (error: any, data: any, response: any) => any): OAuth; + delete(url: string, userToken: string, userSecret: string, callback: (error: any, data: any, response: any) => any): OAuth; + post(url: string, oauth_token: string, oauth_token_secret: string, post_body: any, post_content_type: string, callback: any): OAuth; + put(url: string, oauth_token: string, oauth_token_secret: string, post_body: any, post_content_type: string, callback: any): OAuth; + getOAuthRequestToken(callback: (error: any, oauth_token: string, oauth_token_secret: string, results: any) => void): void; + } +} \ No newline at end of file diff --git a/package.json b/package.json index 1a555333..dbe25311 100644 --- a/package.json +++ b/package.json @@ -4,6 +4,7 @@ , "directories" : { "lib" : "./lib" } , "main" : "index.js" , "author" : "Ciaran Jessup " +, "typings": "index.d.ts" , "repository" : { "type":"git", "url":"http://github.com/ciaranj/node-oauth.git" } , "devDependencies": { "vows": "0.5.x" From 6c47ebaf119d96fa066d5ee1ad067b91c471eb1e Mon Sep 17 00:00:00 2001 From: Luke Date: Fri, 10 Jun 2016 12:55:59 -0400 Subject: [PATCH 2/3] add typings.json --- typings.json | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 typings.json diff --git a/typings.json b/typings.json new file mode 100644 index 00000000..544b7b4d --- /dev/null +++ b/typings.json @@ -0,0 +1,3 @@ +{ + +} \ No newline at end of file From 7298621692670273ea70b15d0168ac349d3318cb Mon Sep 17 00:00:00 2001 From: Luke Date: Fri, 10 Jun 2016 13:08:37 -0400 Subject: [PATCH 3/3] update typings --- index.d.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/index.d.ts b/index.d.ts index 9f4e28a0..19f4ee3d 100644 --- a/index.d.ts +++ b/index.d.ts @@ -1,10 +1,10 @@ -declare module "oauth" { - export class OAuth { +declare class OAuth { constructor(requestTokenUrl: string, accessTokenUrl: string, applicationConsumerKey: string, applicationSecret: string, oauthVersion: string, something: any, encryption: string); get(url: string, userToken: string, userSecret: string, callback: (error: any, data: any, response: any) => any): OAuth; delete(url: string, userToken: string, userSecret: string, callback: (error: any, data: any, response: any) => any): OAuth; post(url: string, oauth_token: string, oauth_token_secret: string, post_body: any, post_content_type: string, callback: any): OAuth; put(url: string, oauth_token: string, oauth_token_secret: string, post_body: any, post_content_type: string, callback: any): OAuth; getOAuthRequestToken(callback: (error: any, oauth_token: string, oauth_token_secret: string, results: any) => void): void; - } -} \ No newline at end of file +} + +export { OAuth };