Comparing version 0.1.1 to 0.2.0
@@ -1,22 +0,27 @@ | ||
export interface Contextor { | ||
/** | ||
* Create a new context. | ||
* @returns {self} | ||
*/ | ||
create: () => this; | ||
/** | ||
* Set a value in the current context. | ||
* @param {string} key - The identifier key. | ||
* @param {*} value - The value. | ||
* @throws {ReferenceError} On missing current context. | ||
*/ | ||
set: (key: string, value: any) => this; | ||
/** | ||
* Get a value in the current context. | ||
* @param {string} key - The identifier key. | ||
* @param {*} defaultValue - The default value to return in case. | ||
* @returns {*} The value or default value for missing key. | ||
* @throws {ReferenceError} On missing value for given key in current context. | ||
*/ | ||
get: (key: string, defaultValue: any) => any; | ||
declare namespace contextor { | ||
interface Contextor { | ||
/** | ||
* Create a new context. | ||
* @returns {self} | ||
*/ | ||
create: () => this; | ||
/** | ||
* Set a value in the current context. | ||
* @param {string} key - The identifier key. | ||
* @param {*} value - The value. | ||
* @throws {ReferenceError} On missing current context. | ||
*/ | ||
set: (key: string, value: any) => this; | ||
/** | ||
* Get a value in the current context. | ||
* @param {string} key - The identifier key. | ||
* @param {*} defaultValue - The default value to return in case. | ||
* @returns {*} The value or default value for missing key. | ||
* @throws {ReferenceError} On missing value for given key in current context. | ||
*/ | ||
get: (key: string, defaultValue: any) => any; | ||
} | ||
} | ||
declare const contextor: contextor.Contextor; | ||
export = contextor; |
{ | ||
"name": "contextor", | ||
"description": "Package allowing to pass a context along an asynchronous process", | ||
"version": "0.1.1", | ||
"version": "0.2.0", | ||
"author": "Thomas Prelot <tprelot@gmail.com> (https://github.com/Gnucki)", | ||
@@ -6,0 +6,0 @@ "contributors": [], |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
15075
241