Skip to content

Commit 7b43114

Browse files
committed
Use explicit type for default replacer
1 parent 80c1847 commit 7b43114

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/data/cbor.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Tagged, decode, encode } from "../cbor";
1+
import { Tagged, decode, encode, type Replacer } from "../cbor";
22
import {
33
cborCustomDateToDate,
44
dateToCborCustomDate,
@@ -55,7 +55,10 @@ const TAG_GEOMETRY_MULTILINE = 92;
5555
const TAG_GEOMETRY_MULTIPOLYGON = 93;
5656
const TAG_GEOMETRY_COLLECTION = 94;
5757

58-
export const replacer = {
58+
export const replacer: {
59+
encode: Replacer;
60+
decode: Replacer;
61+
} = {
5962
encode(v: unknown): unknown {
6063
if (v instanceof Date) {
6164
return new Tagged(TAG_CUSTOM_DATETIME, dateToCborCustomDate(v));

0 commit comments

Comments
 (0)