Skip to content

Commit

Permalink
Improves type declarations
Browse files Browse the repository at this point in the history
  • Loading branch information
eskelter committed Oct 14, 2017
1 parent ba3d104 commit 3853737
Showing 1 changed file with 13 additions and 13 deletions.
26 changes: 13 additions & 13 deletions index.d.ts
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
declare namespace keypair {
export interface Options {
bits?: number,
e?: number
}

export interface Results {
public: string,
private: string
}
// Type definitions for keypair 1.0
// Project: https://www.npmjs.com/package/keypair
// Definitions by: eskelter <https://github.com/eskelter>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.2
export interface KeypairOptions {
bits?: number;
e?: number;
}
export interface KeypairResults {
public: string;
private: string;
}

/**
* Get an RSA PEM key pair.
* @param opts
*/
declare function keypair (opts?: keypair.Options): keypair.Results;

export = keypair;
export function keypair(opts?: KeypairOptions): KeypairResults;

0 comments on commit 3853737

Please sign in to comment.