Skip to content

Commit 3853737

Browse files
committed
Improves type declarations
1 parent ba3d104 commit 3853737

File tree

1 file changed

+13
-13
lines changed

1 file changed

+13
-13
lines changed

index.d.ts

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
1-
declare namespace keypair {
2-
export interface Options {
3-
bits?: number,
4-
e?: number
5-
}
6-
7-
export interface Results {
8-
public: string,
9-
private: string
10-
}
1+
// Type definitions for keypair 1.0
2+
// Project: https://www.npmjs.com/package/keypair
3+
// Definitions by: eskelter <https://github.com/eskelter>
4+
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
5+
// TypeScript Version: 2.2
6+
export interface KeypairOptions {
7+
bits?: number;
8+
e?: number;
9+
}
10+
export interface KeypairResults {
11+
public: string;
12+
private: string;
1113
}
1214

1315
/**
1416
* Get an RSA PEM key pair.
1517
* @param opts
1618
*/
17-
declare function keypair (opts?: keypair.Options): keypair.Results;
18-
19-
export = keypair;
19+
export function keypair(opts?: KeypairOptions): KeypairResults;

0 commit comments

Comments
 (0)