Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/container.ts
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ export class CBORcontainer {
* `cde` mode.
*/
public static dcborDecodeOptions: DecodeOptions = {
...this.cdeDecodeOptions,
...CBORcontainer.cdeDecodeOptions,
dcbor: true,
convertUnsafeIntsToFloat: true,
rejectDuplicateKeys: true,
Expand Down
12 changes: 6 additions & 6 deletions src/tag.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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)) {
Expand All @@ -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;
}

Expand All @@ -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<TagNumber, TagDecoder> {
return new Map(this.#tags);
return new Map(Tag.#tags);
}

/**
Expand Down
Loading