Skip to content

Commit

Permalink
fix: interface exports (#6)
Browse files Browse the repository at this point in the history
Export the interface types so downstream modules can use them.
  • Loading branch information
alanshaw committed Dec 10, 2021
1 parent 7dcfca6 commit 36396f0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
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 }

0 comments on commit 36396f0

Please sign in to comment.