16023: removes deprecated package

This commit is contained in:
slawiko
2017-04-20 19:02:30 +03:00
parent b4a563ee40
commit 1cb14bc59f
4 changed files with 10 additions and 114 deletions
+10 -2
View File
@@ -3,8 +3,16 @@
// Definitions by: slawiko <https://github.com/slawiko>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
export = cookie;
export as namespace cookie;
declare module 'cookie_js' {
export = cookie;
}
/**
* https://github.com/DefinitelyTyped/DefinitelyTyped/pull/16025#issuecomment-295784660
*/
declare module 'cookiejs' {
export = cookie;
}
declare function cookie(key : string, fallback?: string) : string;
declare function cookie(keys : string[], fallback?: string) : string;
-35
View File
@@ -1,35 +0,0 @@
// Based on https://github.com/js-coder/cookie.js/blob/gh-pages/tests/spec.js
import cookie = require("cookiejs");
cookie.set({a: '1', b: '2', c: '3'});
cookie;
cookie.enabled();
cookie.set('n', '5');
cookie.get('a');
cookie.get('__undef__');
cookie.get('__undef__', 'fallback');
cookie.get(['a', 'b']);
cookie.get(['a', '__undef__'], 'fallback');
cookie('a');
cookie('__undef__');
cookie('__undef__', 'fallback');
cookie(['a', 'b']);
cookie(['a', '__undef__'], 'fallback');
cookie.remove('a');
cookie.remove('a', 'b');
cookie.remove(['a', 'b']);
cookie.removeSpecific('a', {path: '/search'});
cookie.removeSpecific(['a', 'b'], {path: '/search'});
cookie.empty();
cookie.all();
-55
View File
@@ -1,55 +0,0 @@
// Type definitions for cookie.js v1.2.2
// Project: https://github.com/florian/cookie.js
// Definitions by: Boltmade <https://github.com/Boltmade>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
/**
* Shortcut for cookie.get()
*/
export = cookie;
export as namespace cookie;
declare function cookie(key : string, fallback?: string) : string;
declare function cookie(keys : string[], fallback?: string) : string;
declare namespace cookie {
/**
* Create a cookie. The value will automatically be escaped.
*/
export function set(key : string, value : string, options? : any) : void;
/**
* Set several cookies at once
*/
export function set(obj : any, options? : any) : void;
/**
* Remove cookies
*/
export function remove(key : string) : void;
export function remove(keys : string[]) : void;
export function remove(...args : string[]) : void;
/**
* Remove cookies that were set with custom options (e.g. specifing domain or path)
*/
export function removeSpecific(key : string, options?: any) : void;
export function removeSpecific(keys : string[], options?: any): void;
/**
* Remove all cookies
*/
export function empty() : void;
/**
* Retrieve the value of the cookie
*/
export function get(key : string, fallback?: string) : string;
/**
* Retrieve values of several cookies
*/
export function get(keys : string[], fallback?: string) : any;
/**
* Get all currently saved cookies
*/
export function all() : any;
/**
* Test if cookies are enabled
*/
export function enabled() : boolean;
}
-22
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",
"cookiejs-tests.ts"
]
}