@polkadot/types-codec 8.9.2-3 → 8.9.2-6
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/abstract/BigInt.d.ts +4 -0
- package/abstract/BigInt.js +13 -0
- package/cjs/abstract/BigInt.js +23 -0
- package/cjs/packageInfo.js +1 -1
- package/package.json +8 -2
- package/packageInfo.js +1 -1
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
// Copyright 2017-2022 @polkadot/types-codec authors & contributors
|
|
2
|
+
// SPDX-License-Identifier: Apache-2.0
|
|
3
|
+
import { BigInt } from '@polkadot/x-bigint'; // @ts-expect-error not extensible, we make it extensible here
|
|
4
|
+
|
|
5
|
+
export class AbstractBigInt extends BigInt {
|
|
6
|
+
// @ts-expect-error super() not required, the self magic does that
|
|
7
|
+
constructor(value) {
|
|
8
|
+
const self = Object(BigInt(value));
|
|
9
|
+
Object.setPrototypeOf(self, AbstractBigInt.prototype);
|
|
10
|
+
return self;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.AbstractBigInt = void 0;
|
|
7
|
+
|
|
8
|
+
var _xBigint = require("@polkadot/x-bigint");
|
|
9
|
+
|
|
10
|
+
// Copyright 2017-2022 @polkadot/types-codec authors & contributors
|
|
11
|
+
// SPDX-License-Identifier: Apache-2.0
|
|
12
|
+
// @ts-expect-error not extensible, we make it extensible here
|
|
13
|
+
class AbstractBigInt extends _xBigint.BigInt {
|
|
14
|
+
// @ts-expect-error super() not required, the self magic does that
|
|
15
|
+
constructor(value) {
|
|
16
|
+
const self = Object((0, _xBigint.BigInt)(value));
|
|
17
|
+
Object.setPrototypeOf(self, AbstractBigInt.prototype);
|
|
18
|
+
return self;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
exports.AbstractBigInt = AbstractBigInt;
|
package/cjs/packageInfo.js
CHANGED
package/package.json
CHANGED
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
"./cjs/detectPackage.js"
|
|
21
21
|
],
|
|
22
22
|
"type": "module",
|
|
23
|
-
"version": "8.9.2-
|
|
23
|
+
"version": "8.9.2-6",
|
|
24
24
|
"main": "./cjs/index.js",
|
|
25
25
|
"module": "./index.js",
|
|
26
26
|
"types": "./index.d.ts",
|
|
@@ -47,6 +47,11 @@
|
|
|
47
47
|
"require": "./cjs/abstract/Base.js",
|
|
48
48
|
"default": "./abstract/Base.js"
|
|
49
49
|
},
|
|
50
|
+
"./abstract/BigInt": {
|
|
51
|
+
"types": "./abstract/BigInt.d.ts",
|
|
52
|
+
"require": "./cjs/abstract/BigInt.js",
|
|
53
|
+
"default": "./abstract/BigInt.js"
|
|
54
|
+
},
|
|
50
55
|
"./abstract/Int": {
|
|
51
56
|
"types": "./abstract/Int.d.ts",
|
|
52
57
|
"require": "./cjs/abstract/Int.js",
|
|
@@ -415,6 +420,7 @@
|
|
|
415
420
|
},
|
|
416
421
|
"dependencies": {
|
|
417
422
|
"@babel/runtime": "^7.18.3",
|
|
418
|
-
"@polkadot/util": "^9.5.1"
|
|
423
|
+
"@polkadot/util": "^9.5.1",
|
|
424
|
+
"@polkadot/x-bigint": "^9.5.1"
|
|
419
425
|
}
|
|
420
426
|
}
|
package/packageInfo.js
CHANGED
|
@@ -5,5 +5,5 @@ export const packageInfo = {
|
|
|
5
5
|
name: '@polkadot/types-codec',
|
|
6
6
|
path: (import.meta && import.meta.url) ? new URL(import.meta.url).pathname.substring(0, new URL(import.meta.url).pathname.lastIndexOf('/') + 1) : 'auto',
|
|
7
7
|
type: 'esm',
|
|
8
|
-
version: '8.9.2-
|
|
8
|
+
version: '8.9.2-6'
|
|
9
9
|
};
|