Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: interface exports #6

Merged
merged 5 commits into from Dec 10, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/bucket.ts
Expand Up @@ -3,7 +3,7 @@ import SparseArray from 'sparse-array'
import { fromString as uint8ArrayFromString } from 'uint8arrays/from-string'
import type { InfiniteHash } from './consumable-hash.js'

interface BucketChild<V> {
export interface BucketChild<V> {
key: string
value: V
hash: InfiniteHash
Expand All @@ -20,14 +20,14 @@ interface SA<B> {
unset: (i: number) => void
}

interface BucketPosition<T> {
export interface BucketPosition<T> {
bucket: Bucket<T>
pos: number
hash: InfiniteHash
existingChild?: BucketChild<T>
}

interface BucketOptions {
export interface BucketOptions {
bits: number
hash: (value: Uint8Array | InfiniteHash) => InfiniteHash
}
Expand Down
2 changes: 2 additions & 0 deletions src/index.ts
@@ -1,4 +1,5 @@
import { Bucket } from './bucket.js'
import type { BucketOptions, BucketPosition, BucketChild } from './bucket.js'
import { wrapHash } from './consumable-hash.js'

interface UserBucketOptions {
Expand All @@ -20,3 +21,4 @@ export function createHAMT<T> (options: UserBucketOptions) {
}

export { Bucket }
export type { BucketOptions, BucketPosition, BucketChild }