File tree Expand file tree Collapse file tree 5 files changed +17
-10
lines changed Expand file tree Collapse file tree 5 files changed +17
-10
lines changed Original file line number Diff line number Diff line change 77 "node" : " >=0.10" 
88 },
99 "main" : " ./lib/auth/googleauth" 
10+  "types" : " ./types/lib/auth/googleauth.d.ts" 
1011 "repository" : {
1112 "type" : " git" 
1213 "url" : " https://github.com/google/google-auth-library-nodejs.git" 
Original file line number Diff line number Diff line change 1414 * limitations under the License. 
1515 */ 
1616
17+ import  *  as  request  from  'request' ; 
18+ 
1719import  Auth2Client  from  './oauth2client' ; 
1820
1921export  default  class  Compute  extends  Auth2Client  { 
@@ -53,7 +55,7 @@ export default class Compute extends Auth2Client {
5355 * @param  {object= } ignored_ 
5456 * @param  {function= } opt_callback Optional callback. 
5557 */ 
56-  protected  refreshToken ( ignored ,  callback ?)  { 
58+  protected  refreshToken ( ignored ,  callback ?) :  request . Request  { 
5759 const  uri  =  this . _opts . tokenUrl  ||  Compute . _GOOGLE_OAUTH2_TOKEN_URL ; 
5860 // request for new token 
5961 return  this . transporter . request ( 
Original file line number Diff line number Diff line change 1515 */ 
1616
1717import  *  as  querystring  from  'querystring' ; 
18+ import  *  as  request  from  'request' ; 
1819
1920import  PemVerifier  from  './../pemverifier' ; 
2021import  AuthClient  from  './authclient' ; 
@@ -149,7 +150,7 @@ export default class OAuth2Client extends AuthClient {
149150 * @param  {function= } opt_callback Optional callback. 
150151 * @private  
151152 */ 
152-  protected  refreshToken ( refresh_token : any ,  opt_callback )  { 
153+  protected  refreshToken ( refresh_token : any ,  opt_callback ) :  request . Request  { 
153154 const  uri  =  this . _opts . tokenUrl  ||  OAuth2Client . GOOGLE_OAUTH2_TOKEN_URL_ ; 
154155 const  values  =  { 
155156 refresh_token : refresh_token , 
Original file line number Diff line number Diff line change 1414 * limitations under the License. 
1515 */ 
1616
17+ import  *  as  request  from  'request' ; 
18+ 
1719import  Auth2Client  from  './oauth2client' ; 
1820
1921export  default  class  UserRefreshClient  extends  Auth2Client  { 
@@ -34,20 +36,19 @@ export default class UserRefreshClient extends Auth2Client {
3436 } 
3537
3638 // Executes the given callback if it is not null. 
37-  private  callback  = 
38-  ( c ,  err ?,  res ?)  =>  { 
39-  if  ( c )  { 
40-  c ( err ,  res ) ; 
41-  } 
42-  } 
39+  private  callback ( c ,  err ?,  res ?)  { 
40+  if  ( c )  { 
41+  c ( err ,  res ) ; 
42+  } 
43+  } 
4344
4445 /** 
4546 * Refreshes the access token. 
4647 * @param  {object= } ignored_ 
4748 * @param  {function= } opt_callback Optional callback. 
4849 * @private  
4950 */ 
50-  protected  refreshToken ( ignored_ ,  opt_callback )  { 
51+  protected  refreshToken ( ignored_ ,  opt_callback ) :  request . Request  { 
5152 return  super . refreshToken ( this . _refreshToken ,  opt_callback ) ; 
5253 } 
5354
Original file line number Diff line number Diff line change 55 "noImplicitAny" : false ,
66 "sourceMap" : true ,
77 "alwaysStrict" : true ,
8-  "outDir" : " ./" 
8+  "outDir" : " ./" 
9+  "declaration" : true ,
10+  "declarationDir" : " types/" 
911 },
1012 "include" : [ " ts/**/*" 
1113 "exclude" : [ " node_modules" 
                         You can’t perform that action at this time. 
           
                  
0 commit comments