We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 80c1847 commit 7b43114Copy full SHA for 7b43114
src/data/cbor.ts
@@ -1,4 +1,4 @@
1
-import { Tagged, decode, encode } from "../cbor";
+import { Tagged, decode, encode, type Replacer } from "../cbor";
2
import {
3
cborCustomDateToDate,
4
dateToCborCustomDate,
@@ -55,7 +55,10 @@ const TAG_GEOMETRY_MULTILINE = 92;
55
const TAG_GEOMETRY_MULTIPOLYGON = 93;
56
const TAG_GEOMETRY_COLLECTION = 94;
57
58
-export const replacer = {
+export const replacer: {
59
+ encode: Replacer;
60
+ decode: Replacer;
61
+} = {
62
encode(v: unknown): unknown {
63
if (v instanceof Date) {
64
return new Tagged(TAG_CUSTOM_DATETIME, dateToCborCustomDate(v));
0 commit comments