diff --git a/src/container.ts b/src/container.ts index f9a01c7..2d9d8b5 100644 --- a/src/container.ts +++ b/src/container.ts @@ -104,7 +104,7 @@ export class CBORcontainer { * `cde` mode. */ public static dcborDecodeOptions: DecodeOptions = { - ...this.cdeDecodeOptions, + ...CBORcontainer.cdeDecodeOptions, dcbor: true, convertUnsafeIntsToFloat: true, rejectDuplicateKeys: true, diff --git a/src/tag.ts b/src/tag.ts index 5919cc0..b2ec65f 100644 --- a/src/tag.ts +++ b/src/tag.ts @@ -56,8 +56,8 @@ export class Tag implements ToCBOR, Decodeable, ITag { decoder: TagDecoder, description?: string ): TagDecoder | undefined { - const old = this.#tags.get(tag); - this.#tags.set(tag, decoder); + const old = Tag.#tags.get(tag); + Tag.#tags.set(tag, decoder); if (old) { // Copy over old commenting attributes. if (!('comment' in decoder)) { @@ -80,8 +80,8 @@ export class Tag implements ToCBOR, Decodeable, ITag { * @returns Old decoder, if there was one. */ public static clearDecoder(tag: TagNumber): TagDecoder | undefined { - const old = this.#tags.get(tag); - this.#tags.delete(tag); + const old = Tag.#tags.get(tag); + Tag.#tags.delete(tag); return old; } @@ -92,14 +92,14 @@ export class Tag implements ToCBOR, Decodeable, ITag { * @returns The decoder function, if there is one. */ public static getDecoder(tag: TagNumber): TagDecoder | undefined { - return this.#tags.get(tag); + return Tag.#tags.get(tag); } /** * Get all registered decoders clone of the map. */ public static getAllDecoders(): ReadonlyMap { - return new Map(this.#tags); + return new Map(Tag.#tags); } /**