[base64url] remove typings provided by package directly (#18335)

Add an optional extended description…
This commit is contained in:
Dimitri Benin
2017-08-05 02:12:29 +02:00
committed by Sheetal Nandi
parent 1c83708f54
commit 257d5eb891
4 changed files with 6 additions and 118 deletions

View File

@@ -72,6 +72,12 @@
"sourceRepoURL": "http://www.babylonjs.com/",
"asOfVersion": "2.4.1"
},
{
"libraryName": "base64url",
"typingsPackageName": "base64url",
"sourceRepoURL": "https://github.com/brianloveswords/base64url",
"asOfVersion": "2.0.0"
},
{
"libraryName": "BigInteger.js",
"typingsPackageName": "big-integer",

View File

@@ -1,24 +0,0 @@
import * as base64url from "base64url";
// default
let str = base64url("some value");
str = base64url("some value", "hex");
str = base64url(new Buffer("some value"));
// encode
str = base64url.encode("some value");
str = base64url.encode("some value", "hex");
str = base64url.encode(new Buffer("some value"));
// decode
str = base64url.decode("ADA=");
str = base64url.decode("ADA=", "binary");
// toBase64
str = base64url.toBase64("ADA=");
str = base64url.toBase64(new Buffer("ADA=", "base64"));
// fromBase64
str = base64url.fromBase64("ADA=");
let buf = base64url.toBase64("ADA=");

View File

@@ -1,72 +0,0 @@
// Type definitions for base64url v2.0.0
// Project: https://github.com/brianloveswords/base64url
// Definitions by: Stepan Miroshin <https://github.com/microshine>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
/// <reference types="node" />
/**
* For encoding and decoding base64url!
* v2.0.0
*/
/**
* Encoding type
*/
declare type Encoding = "ascii" | "utf8" | "utf16le" | "ucs2" | "utf16le" | "base64" | "binary" | "hex"
interface IBase64Url {
/**
* Encode input to base64url
* @param {string} input Incoming input
* @param {Encoding} encoding Default 'utf8'
* @return {string}
*/
(input: string, encoding?: Encoding): string;
/**
* Encode input to base64url
* @param {Buffer} input Incoming value
*/
(inout: Buffer): string;
/**
* Encode input to base64url
*
* @param {string} input Incoming input
* @param {Encoding} encoding Default 'utf8'
* @returns {string}
*/
encode(input: string, encoding?: Encoding): string;
/**
* Encode input to base64url
* @param {Buffer} input Incoming value
*/
encode(input: Buffer): string;
/**
* Convert a base64url encoded string into a raw string.
* @param {string} base64url base64url encoded string
* @param {Encoding} encoding Encoding defaults to 'utf8'
* @returns {string}
*/
decode(base64url: string, encoding?: string): string;
/**
* Convert a base64url encoded string to a base64 encoded string
* @param {string | Buffer} base64url base64url encoded value
* @returns {string}
*/
toBase64(base64url: string | Buffer): string;
/**
* Convert a base64 encoded string to a base64url encoded string
* @param {string} base64 encoded string
* @returns {string}
*/
fromBase64(base64: string): string;
/**
* Convert a base64url encoded string to a Buffer
* @param {string} base64url encoded string
* @returns {Buffer}
*/
toBuffer(base64url: string): Buffer;
}
declare const base64url: IBase64Url;
export = base64url;

View File

@@ -1,22 +0,0 @@
{
"compilerOptions": {
"module": "commonjs",
"lib": [
"es6"
],
"noImplicitAny": true,
"noImplicitThis": true,
"strictNullChecks": false,
"baseUrl": "../",
"typeRoots": [
"../"
],
"types": [],
"noEmit": true,
"forceConsistentCasingInFileNames": true
},
"files": [
"index.d.ts",
"base64url-tests.ts"
]
}