@helios-lang/codec-utils
Advanced tools
Comparing version 0.1.17 to 0.1.18
{ | ||
"name": "@helios-lang/codec-utils", | ||
"version": "0.1.17", | ||
"version": "0.1.18", | ||
"description": "Primitive manipulation functions commonly used in encoding and decoding algorithms", | ||
@@ -5,0 +5,0 @@ "main": "src/index.js", |
/** | ||
* @template T | ||
* @typedef {null | T} Option | ||
*/ | ||
/** | ||
* @template T | ||
* @param {Option<T>} opt | ||
@@ -17,3 +13,11 @@ * @returns {opt is T} | ||
export function isNone<T>(opt: Option<T>): opt is null; | ||
export type Option<T> = null | T; | ||
/** | ||
* @template T | ||
* @typedef {null | undefined | T} Option | ||
*/ | ||
/** | ||
* @type {null} | ||
*/ | ||
export const None: null; | ||
export type Option<T> = null | undefined | T; | ||
//# sourceMappingURL=index.d.ts.map |
/** | ||
* @template T | ||
* @typedef {null | T} Option | ||
* @typedef {null | undefined | T} Option | ||
*/ | ||
/** | ||
* @type {null} | ||
*/ | ||
export const None = null | ||
/** | ||
* @template T | ||
@@ -12,3 +17,3 @@ * @param {Option<T>} opt | ||
export function isSome(opt) { | ||
return opt !== null | ||
return opt !== null && opt !== undefined | ||
} | ||
@@ -22,3 +27,3 @@ | ||
export function isNone(opt) { | ||
return opt === null | ||
return opt === null || opt === undefined | ||
} |
Sorry, the diff of this file is not supported yet
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
65722
2012