@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.
@@ -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);
@@ -11,6 +11,6 @@ const packageInfo = {
11
11
  name: '@polkadot/types-codec',
12
12
  path: typeof __dirname === 'string' ? __dirname : 'auto',
13
13
  type: 'cjs',
14
- version: '8.5.2-0'
14
+ version: '8.5.2-1'
15
15
  };
16
16
  exports.packageInfo = packageInfo;
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 | Boolean | Uint8Array | boolean | number);
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
@@ -20,7 +20,7 @@
20
20
  "./cjs/detectPackage.js"
21
21
  ],
22
22
  "type": "module",
23
- "version": "8.5.2-0",
23
+ "version": "8.5.2-1",
24
24
  "main": "./cjs/index.js",
25
25
  "module": "./index.js",
26
26
  "types": "./index.d.ts",
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-0'
8
+ version: '8.5.2-1'
9
9
  };
@@ -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 = string | string;
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;