@hazae41/option
Advanced tools
Comparing version 1.0.11 to 1.0.12
export { None, NoneError } from './mods/option/none.js'; | ||
export { Option } from './mods/option/option.js'; | ||
export { Option, Optional } from './mods/option/option.js'; | ||
export { Some } from './mods/option/some.js'; |
@@ -0,4 +1,6 @@ | ||
import { Promiseable } from '../../libs/promises/promises.js'; | ||
import { None } from './none.js'; | ||
import { Some } from './some.js'; | ||
type Optional<T> = T | undefined; | ||
type Option<T> = Some<T> | None; | ||
@@ -11,5 +13,7 @@ declare namespace Option { | ||
*/ | ||
function from<T>(inner: T | undefined): Option<T>; | ||
function from<T>(inner: Optional<T>): Option<T>; | ||
function map<T, U>(inner: Optional<T>, mapper: (inner: T) => Promiseable<U>): Promise<U | undefined>; | ||
function mapSync<T, U>(inner: Optional<T>, mapper: (inner: T) => U): U | undefined; | ||
} | ||
export { Option }; | ||
export { Option, Optional }; |
{ | ||
"type": "module", | ||
"name": "@hazae41/option", | ||
"version": "1.0.11", | ||
"version": "1.0.12", | ||
"description": "Rust-like Option for TypeScript", | ||
@@ -6,0 +6,0 @@ "homepage": "https://github.com/hazae41/option", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
120667
1785