Skip to content

Commit

Permalink
Merge pull request #2 from AndSDev/types
Browse files Browse the repository at this point in the history
Add TypeScript type definitions
  • Loading branch information
dchest authored Nov 22, 2016
2 parents b7102aa + 526b4eb commit b4303e2
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
11 changes: 11 additions & 0 deletions nacl-util.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
// Type definitions for tweetnacl-util

declare var util: util;
export = util;

interface util {
decodeUTF8(s: string): Uint8Array;
encodeUTF8(arr: Uint8Array): string;
encodeBase64(arr: Uint8Array): string;
decodeBase64(s: string): Uint8Array;
}
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"version": "0.13.3",
"description": "String encoding utilitlies extracted from TweetNaCl.js",
"main": "nacl-util.js",
"types": "nacl-util.d.ts",
"scripts": {
"build": "uglifyjs nacl-util.js -c -m -o nacl-util.min.js"
},
Expand Down

0 comments on commit b4303e2

Please sign in to comment.