@polkadot/types-codec 6.12.2-4 → 6.12.2-5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/native/Json.cjs CHANGED
@@ -70,6 +70,10 @@ class Json extends Map {
70
70
  eq(other) {
71
71
  return (0, _index.compareMap)(this, other);
72
72
  }
73
+
74
+ getT(key) {
75
+ return this.get(key);
76
+ }
73
77
  /**
74
78
  * @description Unimplemented, will throw
75
79
  */
package/native/Json.d.ts CHANGED
@@ -28,6 +28,7 @@ export declare class Json extends Map<string, any> implements Codec {
28
28
  * @description Compares the value of the input to see if there is a match
29
29
  */
30
30
  eq(other?: unknown): boolean;
31
+ getT<T>(key: string): T;
31
32
  /**
32
33
  * @description Unimplemented, will throw
33
34
  */
package/native/Json.js CHANGED
@@ -58,6 +58,10 @@ export class Json extends Map {
58
58
  eq(other) {
59
59
  return compareMap(this, other);
60
60
  }
61
+
62
+ getT(key) {
63
+ return this.get(key);
64
+ }
61
65
  /**
62
66
  * @description Unimplemented, will throw
63
67
  */
package/native/Struct.cjs CHANGED
@@ -128,6 +128,10 @@ class Struct extends Map {
128
128
  get defKeys() {
129
129
  return Object.keys((0, _classPrivateFieldLooseBase2.default)(this, _Types)[_Types]);
130
130
  }
131
+
132
+ getT(key) {
133
+ return this.get(key);
134
+ }
131
135
  /**
132
136
  * @description Checks if the value is an empty value
133
137
  */
@@ -30,6 +30,7 @@ export declare class Struct<S extends TypesDef = TypesDef, V extends {
30
30
  * @description The available keys for this struct
31
31
  */
32
32
  get defKeys(): string[];
33
+ getT<T>(key: string): T;
33
34
  /**
34
35
  * @description Checks if the value is an empty value
35
36
  */
package/native/Struct.js CHANGED
@@ -114,6 +114,10 @@ export class Struct extends Map {
114
114
  get defKeys() {
115
115
  return Object.keys(_classPrivateFieldLooseBase(this, _Types)[_Types]);
116
116
  }
117
+
118
+ getT(key) {
119
+ return this.get(key);
120
+ }
117
121
  /**
118
122
  * @description Checks if the value is an empty value
119
123
  */
package/package.json CHANGED
@@ -20,7 +20,7 @@
20
20
  "./detectPackage.cjs"
21
21
  ],
22
22
  "type": "module",
23
- "version": "6.12.2-4",
23
+ "version": "6.12.2-5",
24
24
  "main": "index.js",
25
25
  "dependencies": {
26
26
  "@babel/runtime": "^7.16.3",
package/packageInfo.cjs CHANGED
@@ -9,6 +9,6 @@ exports.packageInfo = void 0;
9
9
  // Auto-generated by @polkadot/dev, do not edit
10
10
  const packageInfo = {
11
11
  name: '@polkadot/types-codec',
12
- version: '6.12.2-4'
12
+ version: '6.12.2-5'
13
13
  };
14
14
  exports.packageInfo = packageInfo;
package/packageInfo.js CHANGED
@@ -3,5 +3,5 @@
3
3
  // Auto-generated by @polkadot/dev, do not edit
4
4
  export const packageInfo = {
5
5
  name: '@polkadot/types-codec',
6
- version: '6.12.2-4'
6
+ version: '6.12.2-5'
7
7
  };