Search for update logic
Summary: To be used in the following diff and because it's super side effect heavy, I didn't bother to implement tests for it. Reviewed By: jknoxville Differential Revision: D18479311 fbshipit-source-id: 5cbcae0ebf2de4558b993325e50f6a2da1ed3ea7
This commit is contained in:
committed by
Facebook Github Bot
parent
8afc1b67f3
commit
7a148ef7a6
38
types/npm-api.d.ts
vendored
Normal file
38
types/npm-api.d.ts
vendored
Normal file
@@ -0,0 +1,38 @@
|
||||
/**
|
||||
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*
|
||||
* @format
|
||||
*/
|
||||
|
||||
// Very incomplete stub with only the methods we use defined.
|
||||
declare module 'npm-api' {
|
||||
export default class NpmApi {
|
||||
constructor(...args: any[]);
|
||||
|
||||
list(...args: any[]): any;
|
||||
|
||||
maintainer(...args: any[]): any;
|
||||
|
||||
repo(name: string): Repository;
|
||||
|
||||
reset(...args: any[]): any;
|
||||
|
||||
use(...args: any[]): any;
|
||||
|
||||
view(...args: any[]): any;
|
||||
|
||||
}
|
||||
|
||||
export class Repository {
|
||||
package(): Promise<Package>;
|
||||
}
|
||||
|
||||
export interface Package {
|
||||
name: string;
|
||||
version: string;
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user