Skip to content

Commit 7f5786d

Browse files
committed
Narrow value type
1 parent f61b871 commit 7f5786d

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/ordered-keyvalue.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ export const OrderedKeyValueApi = ({
150150
}: { amount?: number } = {}): AsyncGenerator<
151151
{
152152
key: string;
153-
value: unknown;
153+
value: DagCborEncodable;
154154
position: number;
155155
hash: string;
156156
},
@@ -168,7 +168,7 @@ export const OrderedKeyValueApi = ({
168168

169169
if (op === "PUT" && keys[key] !== true) {
170170
const hash = entry.hash;
171-
const putValue = value as { value: unknown; position: number };
171+
const putValue = value as { value: DagCborEncodable; position: number };
172172

173173
const position =
174174
typeof keys[key] === "number"
@@ -197,7 +197,7 @@ export const OrderedKeyValueApi = ({
197197
const all = async () => {
198198
const entries: {
199199
key: string;
200-
value: unknown;
200+
value: DagCborEncodable;
201201
hash: string;
202202
position: number;
203203
}[] = [];

0 commit comments

Comments
 (0)