@rimbu/hashed
Advanced tools
Comparing version 0.6.7 to 0.6.8
@@ -21,3 +21,2 @@ import type { CustomBase, RMap } from '@rimbu/collection-types'; | ||
export declare namespace HashMap { | ||
type NonEmptyBase<K, V> = CustomBase.RMapBase.NonEmpty<K, V, HashMap.Types> & HashMap<K, V>; | ||
/** | ||
@@ -34,3 +33,3 @@ * A non-empty type-invariant immutable Map of key type K, and value type V. | ||
*/ | ||
export interface NonEmpty<K, V> extends NonEmptyBase<K, V>, Streamable.NonEmpty<readonly [K, V]> { | ||
interface NonEmpty<K, V> extends CustomBase.RMapBase.NonEmpty<K, V, HashMap.Types>, Omit<HashMap<K, V>, keyof CustomBase.RMapBase.NonEmpty<any, any, any>>, Streamable.NonEmpty<readonly [K, V]> { | ||
stream(): Stream.NonEmpty<readonly [K, V]>; | ||
@@ -43,3 +42,3 @@ } | ||
*/ | ||
export interface Context<UK> extends CustomBase.RMapBase.Context<UK, HashMap.Types> { | ||
interface Context<UK> extends CustomBase.RMapBase.Context<UK, HashMap.Types> { | ||
readonly typeTag: 'HashMap'; | ||
@@ -60,5 +59,5 @@ /** | ||
*/ | ||
export interface Builder<K, V> extends CustomBase.RMapBase.Builder<K, V, HashMap.Types> { | ||
interface Builder<K, V> extends CustomBase.RMapBase.Builder<K, V, HashMap.Types> { | ||
} | ||
export interface Types extends RMap.Types { | ||
interface Types extends RMap.Types { | ||
normal: HashMap<this['_K'], this['_V']>; | ||
@@ -69,3 +68,2 @@ nonEmpty: HashMap.NonEmpty<this['_K'], this['_V']>; | ||
} | ||
export {}; | ||
} | ||
@@ -72,0 +70,0 @@ declare function createContext<UK>(options?: { |
{ | ||
"name": "@rimbu/hashed", | ||
"version": "0.6.7", | ||
"version": "0.6.8", | ||
"description": "Immutable HashMap and HashSet implementations for TypeScript", | ||
@@ -16,3 +16,3 @@ "keywords": [ | ||
], | ||
"homepage": "http://rimbu.org", | ||
"homepage": "https://rimbu.org", | ||
"author": { | ||
@@ -62,7 +62,7 @@ "name": "Arvid Nicolaas", | ||
"dependencies": { | ||
"@rimbu/base": "^0.6.6", | ||
"@rimbu/collection-types": "^0.7.4", | ||
"@rimbu/common": "^0.7.4", | ||
"@rimbu/list": "^0.7.4", | ||
"@rimbu/stream": "^0.7.4", | ||
"@rimbu/base": "^0.6.7", | ||
"@rimbu/collection-types": "^0.7.5", | ||
"@rimbu/common": "^0.7.5", | ||
"@rimbu/list": "^0.7.5", | ||
"@rimbu/stream": "^0.7.5", | ||
"tslib": "^2.3.1" | ||
@@ -76,3 +76,3 @@ }, | ||
}, | ||
"gitHead": "e509f9938fad6253702f6b78eb9f8e3b3a8f92ac" | ||
"gitHead": "20739fd0c0d5c565eeecd3e266dd51f893e8d67c" | ||
} |
@@ -16,5 +16,5 @@ <p align="center"> | ||
For complete documentation please visit the _[Rimbu Docs](http://rimbu.org)_. | ||
For complete documentation please visit the [Map](https://rimbu.org/docs/collections/map) or [Set](https://rimbu.org/docs/collections/set) page _[Rimbu Docs](https://rimbu.org)_. | ||
Or [Try Me Out](https://codesandbox.io/s/rimbu-sandbox-d4tbk?previewwindow=console&view=split&editorsize=65&moduleview=1&module=/src/index.ts) in CodeSandBox. | ||
Or [Try Out Rimbu](https://codesandbox.io/s/github/vitoke/rimbu-sandbox/tree/main?previewwindow=console&view=split&editorsize=65&moduleview=1&module=/src/index.ts) in CodeSandBox. | ||
@@ -21,0 +21,0 @@ ## Installation |
@@ -63,3 +63,3 @@ import { Eq } from '@rimbu/common'; | ||
}, | ||
hash(value) { | ||
hash(value): number { | ||
const length = Math.min(value.length, maxSteps); | ||
@@ -144,3 +144,3 @@ const stepSize = Math.max(1, value.length >>> maxStepBits); | ||
}, | ||
hash(value) { | ||
hash(value): number { | ||
const length = Math.min(value.length, maxSteps); | ||
@@ -179,3 +179,3 @@ const stepSize = Math.max(1, value.length >>> maxStepBits); | ||
}, | ||
hash(value) { | ||
hash(value): number { | ||
const length = Math.min(value.length, maxSteps); | ||
@@ -239,3 +239,3 @@ const stepSize = Math.max(1, value.length >>> maxStepBits); | ||
}, | ||
hash(source) { | ||
hash(source): number { | ||
const iter = Stream.from(source)[Symbol.iterator](); | ||
@@ -420,3 +420,3 @@ | ||
}, | ||
hash(value) { | ||
hash(value): number { | ||
return valueHasher.hash(value.valueOf()); | ||
@@ -490,3 +490,3 @@ }, | ||
}, | ||
hash(value) { | ||
hash(value): number { | ||
if (value === null) return NULL_VALUE; | ||
@@ -588,3 +588,3 @@ | ||
}, | ||
hash(value) { | ||
hash(value): number { | ||
const valueType = typeof value; | ||
@@ -591,0 +591,0 @@ |
@@ -24,5 +24,2 @@ import type { CustomBase, RMap } from '@rimbu/collection-types'; | ||
export namespace HashMap { | ||
type NonEmptyBase<K, V> = CustomBase.RMapBase.NonEmpty<K, V, HashMap.Types> & | ||
HashMap<K, V>; | ||
/** | ||
@@ -40,3 +37,4 @@ * A non-empty type-invariant immutable Map of key type K, and value type V. | ||
export interface NonEmpty<K, V> | ||
extends NonEmptyBase<K, V>, | ||
extends CustomBase.RMapBase.NonEmpty<K, V, HashMap.Types>, | ||
Omit<HashMap<K, V>, keyof CustomBase.RMapBase.NonEmpty<any, any, any>>, | ||
Streamable.NonEmpty<readonly [K, V]> { | ||
@@ -43,0 +41,0 @@ stream(): Stream.NonEmpty<readonly [K, V]>; |
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
480117
8401
Updated@rimbu/base@^0.6.7
Updated@rimbu/common@^0.7.5
Updated@rimbu/list@^0.7.5
Updated@rimbu/stream@^0.7.5