Files
DefinitelyTyped/js-base64/js-base64.d.ts
Denis Carriere 0de1b9fc3d Added js-base64 typings
- Checked compilation with commonjs & es6
- Added methods (encode, encodeURI, decode)
- Added Todo list for remaining methods
2016-08-04 14:09:56 -04:00

52 lines
899 B
TypeScript

// Type definitions for js-base64 v2.1.9
// Project: https://github.com/dankogai/js-base64
// Definitions by: Denis Carriere <https://github.com/DenisCarriere>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
/**
## TODO
add methods:
- [x] encode
- [x] encodeURI
- [x] decode
- [ ] atob
- [ ] btoa
- [ ] fromBase64
- [ ] toBase64
- [ ] utob
- [ ] btou
- [ ] noConflict
*/
interface Base64 {
/**
* .encode
* @param {String} string
* @return {String}
*/
encode(base64: string): string;
/**
* .encodeURI
* @param {String} string
* @return {String}
*/
encodeURI(base64: string): string
/**
* .decode
* @param {String} string
* @return {String}
*/
decode(base64: string): string
/**
* Library version
*/
VERSION:string
}
declare module 'js-base64' {
const Base64: Base64
}