@polkadot/types-codec 9.8.2 → 9.9.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/base/Enum.d.ts CHANGED
@@ -12,7 +12,7 @@ interface EntryDef {
12
12
  Type: CodecClass;
13
13
  index: number;
14
14
  }
15
- declare type TypesDef = Record<string, EntryDef>;
15
+ type TypesDef = Record<string, EntryDef>;
16
16
  interface Options {
17
17
  definition?: Definition;
18
18
  setDefinition?: (d: Definition) => Definition;
package/base/Tuple.d.ts CHANGED
@@ -1,10 +1,10 @@
1
1
  import type { AnyTupleValue, Codec, CodecClass, Inspect, ITuple, Registry } from '../types';
2
2
  import { AbstractArray } from '../abstract/Array';
3
- declare type TupleType = (CodecClass | string);
4
- declare type TupleTypes = TupleType[] | {
3
+ type TupleType = (CodecClass | string);
4
+ type TupleTypes = TupleType[] | {
5
5
  [index: string]: CodecClass | string;
6
6
  };
7
- declare type Definition = [CodecClass[], string[]];
7
+ type Definition = [CodecClass[], string[]];
8
8
  interface Options {
9
9
  definition?: Definition;
10
10
  setDefinition?: (d: Definition) => Definition;
@@ -13,6 +13,6 @@ const packageInfo = {
13
13
  name: '@polkadot/types-codec',
14
14
  path: typeof __dirname === 'string' ? __dirname : 'auto',
15
15
  type: 'cjs',
16
- version: '9.8.2'
16
+ version: '9.9.1'
17
17
  };
18
18
  exports.packageInfo = packageInfo;
@@ -2,7 +2,7 @@ import type { Codec, CodecClass, Registry } from '../types';
2
2
  import { Option } from '../base/Option';
3
3
  import { Tuple } from '../base/Tuple';
4
4
  import { Struct } from '../native/Struct';
5
- declare type TypeWithValues = [CodecClass, any[]];
5
+ type TypeWithValues = [CodecClass, any[]];
6
6
  /**
7
7
  * @name Linkage
8
8
  * @description The wrapper for the result from a LinkedMap
@@ -1,6 +1,6 @@
1
1
  import type { AnyTuple, CodecClass, INumber, Registry } from '../types';
2
2
  import { Tuple } from '../base/Tuple';
3
- declare type RangeType = 'Range' | 'RangeInclusive';
3
+ type RangeType = 'Range' | 'RangeInclusive';
4
4
  interface Options {
5
5
  rangeName?: RangeType;
6
6
  }
@@ -1,6 +1,6 @@
1
1
  import type { AnyJson, Codec, CodecClass, Inspect, Registry } from '../types';
2
2
  import { Bytes } from './Bytes';
3
- declare type OpaqueName = 'WrapperKeepOpaque' | 'WrapperOpaque';
3
+ type OpaqueName = 'WrapperKeepOpaque' | 'WrapperOpaque';
4
4
  interface Options {
5
5
  opaqueName?: OpaqueName;
6
6
  }
package/native/Set.d.ts CHANGED
@@ -2,7 +2,7 @@
2
2
  import type { HexString } from '@polkadot/util/types';
3
3
  import type { CodecClass, Inspect, ISet, IU8a, Registry } from '../types';
4
4
  import { BN } from '@polkadot/util';
5
- declare type SetValues = Record<string, number | BN>;
5
+ type SetValues = Record<string, number | BN>;
6
6
  /**
7
7
  * @name Set
8
8
  * @description
@@ -1,7 +1,7 @@
1
1
  import type { HexString } from '@polkadot/util/types';
2
2
  import type { AnyJson, BareOpts, Codec, CodecClass, Inspect, IStruct, IU8a, Registry } from '../types';
3
- declare type TypesDef<T = Codec> = Record<string, string | CodecClass<T>>;
4
- declare type Definition = [CodecClass[], string[]];
3
+ type TypesDef<T = Codec> = Record<string, string | CodecClass<T>>;
4
+ type Definition = [CodecClass[], string[]];
5
5
  interface Options {
6
6
  definition?: Definition;
7
7
  setDefinition?: (d: Definition) => Definition;
package/package.json CHANGED
@@ -20,7 +20,7 @@
20
20
  "./cjs/detectPackage.js"
21
21
  ],
22
22
  "type": "module",
23
- "version": "9.8.2",
23
+ "version": "9.9.1",
24
24
  "main": "./cjs/index.js",
25
25
  "module": "./index.js",
26
26
  "types": "./index.d.ts",
@@ -435,7 +435,7 @@
435
435
  },
436
436
  "dependencies": {
437
437
  "@babel/runtime": "^7.20.1",
438
- "@polkadot/util": "^10.1.12",
439
- "@polkadot/x-bigint": "^10.1.12"
438
+ "@polkadot/util": "^10.1.13",
439
+ "@polkadot/x-bigint": "^10.1.13"
440
440
  }
441
441
  }
package/packageInfo.js CHANGED
@@ -7,5 +7,5 @@ export const packageInfo = {
7
7
  name: '@polkadot/types-codec',
8
8
  path: (import.meta && import.meta.url) ? new URL(import.meta.url).pathname.substring(0, new URL(import.meta.url).pathname.lastIndexOf('/') + 1) : 'auto',
9
9
  type: 'esm',
10
- version: '9.8.2'
10
+ version: '9.9.1'
11
11
  };
package/types/codec.d.ts CHANGED
@@ -2,7 +2,7 @@ import type { HexString } from '@polkadot/util/types';
2
2
  import type { AnyJson } from './helpers';
3
3
  import type { IU8a } from './interfaces';
4
4
  import type { Registry } from './registry';
5
- export declare type BareOpts = boolean | Record<string, boolean>;
5
+ export type BareOpts = boolean | Record<string, boolean>;
6
6
  export interface Inspect {
7
7
  inner?: Inspect[];
8
8
  name?: string;
@@ -85,5 +85,5 @@ export interface CodecClass<T = Codec> {
85
85
  readonly __fallbackType?: string;
86
86
  new (registry: Registry, ...args: any[]): T;
87
87
  }
88
- export declare type CodecTo = 'toHex' | 'toJSON' | 'toPrimitive' | 'toString' | 'toU8a';
89
- export declare type ArgsDef = Record<string, CodecClass | string>;
88
+ export type CodecTo = 'toHex' | 'toJSON' | 'toPrimitive' | 'toString' | 'toU8a';
89
+ export type ArgsDef = Record<string, CodecClass | string>;
@@ -1,16 +1,16 @@
1
1
  /// <reference types="bn.js" />
2
2
  import type { BN } from '@polkadot/util';
3
3
  import type { Codec } from './codec';
4
- export declare type AnyJson = string | number | boolean | null | undefined | AnyJson[] | {
4
+ export type AnyJson = string | number | boolean | null | undefined | AnyJson[] | {
5
5
  [index: string]: AnyJson;
6
6
  };
7
- export declare type AnyFunction = (...args: any[]) => any;
8
- export declare type AnyNumber = BN | bigint | Uint8Array | number | string;
9
- export declare type AnyFloat = Number | number | Uint8Array | string;
10
- export declare type AnyString = String | string;
11
- export declare type AnyBool = Boolean | boolean;
12
- export declare type AnyTuple = Codec[];
13
- export declare type AnyU8a = Uint8Array | number[] | string;
14
- export declare type UIntBitLength = 8 | 16 | 32 | 64 | 128 | 256;
15
- export declare type U8aBitLength = 8 | 16 | 32 | 64 | 128 | 160 | 256 | 264 | 512 | 520 | 1024 | 2048;
16
- export declare type AnyTupleValue = AnyU8a | (Codec | AnyU8a | AnyNumber | AnyString | undefined | null)[];
7
+ export type AnyFunction = (...args: any[]) => any;
8
+ export type AnyNumber = BN | bigint | Uint8Array | number | string;
9
+ export type AnyFloat = Number | number | Uint8Array | string;
10
+ export type AnyString = String | string;
11
+ export type AnyBool = Boolean | boolean;
12
+ export type AnyTuple = Codec[];
13
+ export type AnyU8a = Uint8Array | number[] | string;
14
+ export type UIntBitLength = 8 | 16 | 32 | 64 | 128 | 256;
15
+ export type U8aBitLength = 8 | 16 | 32 | 64 | 128 | 160 | 256 | 264 | 512 | 520 | 1024 | 2048;
16
+ export type AnyTupleValue = AnyU8a | (Codec | AnyU8a | AnyNumber | AnyString | undefined | null)[];
@@ -53,7 +53,7 @@ export interface IStruct<K = string, V extends Codec = Codec> extends Map<K, V>,
53
53
  }
54
54
  export interface IText extends String, Codec {
55
55
  }
56
- export declare type ITuple<T extends AnyTuple = Codec[]> = T & Codec;
56
+ export type ITuple<T extends AnyTuple = Codec[]> = T & Codec;
57
57
  export interface IU8a extends Uint8Array, Codec {
58
58
  readonly isAscii: boolean;
59
59
  readonly isUtf8: boolean;
@@ -3,7 +3,7 @@ import type { BN } from '@polkadot/util';
3
3
  import type { Codec, CodecClass } from './codec';
4
4
  import type { AnyTuple } from './helpers';
5
5
  import type { ICompact, IEnum, IMap, IMethod, INumber, IOption, IResult, ISet, IStruct, ITuple, IU8a, IVec } from './interfaces';
6
- export declare type OnlyCodec<K, T, Types> = K extends keyof Types ? Types[K] : T extends ICompact | IEnum | IMap | IMethod | INumber | IOption | IResult | ISet | IStruct | ITuple | IU8a | IVec ? T : T extends Codec ? T : never;
6
+ export type OnlyCodec<K, T, Types> = K extends keyof Types ? Types[K] : T extends ICompact | IEnum | IMap | IMethod | INumber | IOption | IResult | ISet | IStruct | ITuple | IU8a | IVec ? T : T extends Codec ? T : never;
7
7
  export interface RegistryError {
8
8
  args: string[];
9
9
  docs: string[];
@@ -12,7 +12,7 @@ export interface RegistryError {
12
12
  name: string;
13
13
  section: string;
14
14
  }
15
- export declare type RegistryTypes = Record<string, CodecClass | string | Record<string, string> | {
15
+ export type RegistryTypes = Record<string, CodecClass | string | Record<string, string> | {
16
16
  _enum: string[] | Record<string, number> | Record<string, string | null>;
17
17
  } | {
18
18
  _set: Record<string, number>;
@@ -1,5 +1,5 @@
1
1
  import { AnyString } from '../types';
2
- declare type Mapper = (value: string) => string;
2
+ type Mapper = (value: string) => string;
3
3
  export declare function trim(): Mapper;
4
4
  export declare function findClosing(value: string, start: number): number;
5
5
  export declare function alias(src: string, dest: string, withChecks?: boolean): Mapper;
@@ -1,7 +1,7 @@
1
1
  /// <reference types="bn.js" />
2
2
  import type { BN } from '@polkadot/util';
3
3
  import type { Codec } from '../types';
4
- declare type SortArg = Codec | Codec[] | number[] | BN | bigint | number | Uint8Array;
4
+ type SortArg = Codec | Codec[] | number[] | BN | bigint | number | Uint8Array;
5
5
  /**
6
6
  * Sort keys/values of BTreeSet/BTreeMap in ascending order for encoding compatibility with Rust's BTreeSet/BTreeMap
7
7
  * (https://doc.rust-lang.org/stable/std/collections/struct.BTreeSet.html)