@polkadot/types-codec 8.5.2-0 → 8.5.2-1
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/cjs/native/Bool.js +0 -1
- package/cjs/packageInfo.js +1 -1
- package/native/Bool.d.ts +2 -2
- package/native/Bool.js +0 -1
- package/package.json +1 -1
- package/packageInfo.js +1 -1
- package/types/helpers.d.ts +2 -1
package/cjs/native/Bool.js
CHANGED
|
@@ -17,7 +17,6 @@ var _util = require("@polkadot/util");
|
|
|
17
17
|
* @noInheritDoc
|
|
18
18
|
*/
|
|
19
19
|
class bool extends Boolean {
|
|
20
|
-
// eslint-disable-next-line @typescript-eslint/ban-types
|
|
21
20
|
constructor(registry) {
|
|
22
21
|
let value = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
|
|
23
22
|
super((0, _util.isU8a)(value) ? value[0] === 1 : value instanceof Boolean ? value.valueOf() : !!value);
|
package/cjs/packageInfo.js
CHANGED
package/native/Bool.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { HexString } from '@polkadot/util/types';
|
|
2
|
-
import type { Codec, Inspect, IU8a, Registry } from '../types';
|
|
2
|
+
import type { AnyBool, Codec, Inspect, IU8a, Registry } from '../types';
|
|
3
3
|
/**
|
|
4
4
|
* @name bool
|
|
5
5
|
* @description
|
|
@@ -9,7 +9,7 @@ import type { Codec, Inspect, IU8a, Registry } from '../types';
|
|
|
9
9
|
export declare class bool extends Boolean implements Codec {
|
|
10
10
|
readonly registry: Registry;
|
|
11
11
|
createdAtHash?: IU8a;
|
|
12
|
-
constructor(registry: Registry, value?: bool |
|
|
12
|
+
constructor(registry: Registry, value?: bool | AnyBool | Uint8Array | number);
|
|
13
13
|
/**
|
|
14
14
|
* @description The length of the value when encoded as a Uint8Array
|
|
15
15
|
*/
|
package/native/Bool.js
CHANGED
|
@@ -9,7 +9,6 @@ import { isU8a, u8aToHex } from '@polkadot/util';
|
|
|
9
9
|
*/
|
|
10
10
|
|
|
11
11
|
export class bool extends Boolean {
|
|
12
|
-
// eslint-disable-next-line @typescript-eslint/ban-types
|
|
13
12
|
constructor(registry, value = false) {
|
|
14
13
|
super(isU8a(value) ? value[0] === 1 : value instanceof Boolean ? value.valueOf() : !!value);
|
|
15
14
|
this.registry = registry;
|
package/package.json
CHANGED
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.5.2-
|
|
8
|
+
version: '8.5.2-1'
|
|
9
9
|
};
|
package/types/helpers.d.ts
CHANGED
|
@@ -6,7 +6,8 @@ export declare type AnyJson = string | number | boolean | null | undefined | Any
|
|
|
6
6
|
};
|
|
7
7
|
export declare type AnyFunction = (...args: any[]) => any;
|
|
8
8
|
export declare type AnyNumber = BN | bigint | Uint8Array | number | string;
|
|
9
|
-
export declare type AnyString =
|
|
9
|
+
export declare type AnyString = String | string;
|
|
10
|
+
export declare type AnyBool = Boolean | boolean;
|
|
10
11
|
export declare type AnyTuple = Codec[];
|
|
11
12
|
export declare type AnyU8a = Uint8Array | number[] | string;
|
|
12
13
|
export declare type UIntBitLength = 8 | 16 | 32 | 64 | 128 | 256;
|