Skip to content

Commit

Permalink
Merge pull request #4 from pizzahutuk/types
Browse files Browse the repository at this point in the history
added typescript definition
  • Loading branch information
brendan-hurley authored Jun 27, 2019
2 parents ba7e44b + 679b64a commit e69fe81
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 2 deletions.
19 changes: 19 additions & 0 deletions index.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
export = Credstash;

declare class Credstash {
list(options: Credstash.IOptions, callback: Credstash.Callback<string[]>): void;
list(callback: Credstash.Callback<string[]>): void;

get(value: string, options: Credstash.IOptions, callback: Credstash.Callback<string>): void;
get(value: string, callback: Credstash.Callback<string>): void;
}

declare namespace Credstash {
type Callback<T> = (err: Error | null, response: T) => void;

interface IOptions {
limit?: number,
region?: string,
table?: string
}
}
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@pizza-hut/credstash",
"version": "1.3.0",
"version": "1.3.1",
"description": "Module for reading credstash secrets",
"main": "index.js",
"scripts": {
Expand Down

0 comments on commit e69fe81

Please sign in to comment.