import type (#782)

This commit is contained in:
Jaco Greeff
2020-12-01 13:24:37 +01:00
committed by GitHub
parent 7f489e1a99
commit af71673c7b
64 changed files with 74 additions and 72 deletions
+1 -1
View File
@@ -1,7 +1,7 @@
// Copyright 2017-2020 @polkadot/util authors & contributors
// SPDX-License-Identifier: Apache-2.0
import { ToBn } from '../types';
import type { ToBn } from '../types';
import BN from 'bn.js';
+1 -1
View File
@@ -1,7 +1,7 @@
// Copyright 2017-2020 @polkadot/util authors & contributors
// SPDX-License-Identifier: Apache-2.0
import { ToBn, ToBnOptions } from '../types';
import type { ToBn, ToBnOptions } from '../types';
import BN from 'bn.js';
+1 -1
View File
@@ -1,7 +1,7 @@
// Copyright 2017-2020 @polkadot/util authors & contributors
// SPDX-License-Identifier: Apache-2.0
import { ToBn, ToBnOptions } from '../types';
import type { ToBn, ToBnOptions } from '../types';
import BN from 'bn.js';
+1 -1
View File
@@ -1,6 +1,6 @@
// Copyright 2017-2020 @polkadot/util authors & contributors
// SPDX-License-Identifier: Apache-2.0
import { BitLength } from './types';
import type { BitLength } from './types';
export const DEFAULT_BITLENGTH: BitLength = 32;
+1 -1
View File
@@ -1,7 +1,7 @@
// Copyright 2017-2020 @polkadot/util authors & contributors
// SPDX-License-Identifier: Apache-2.0
import { BitLength } from './types';
import type { BitLength } from './types';
import BN from 'bn.js';
+1 -1
View File
@@ -1,7 +1,7 @@
// Copyright 2017-2020 @polkadot/util authors & contributors
// SPDX-License-Identifier: Apache-2.0
import { BitLength } from './types';
import type { BitLength } from './types';
import { DEFAULT_BITLENGTH } from './defaults';
import { compactFromU8a } from './fromU8a';
+1 -1
View File
@@ -1,7 +1,7 @@
// Copyright 2017-2020 @polkadot/util authors & contributors
// SPDX-License-Identifier: Apache-2.0
import { Time } from './types';
import type { Time } from './types';
const HRS = 60 * 60;
const DAY = HRS * 24;
+1 -1
View File
@@ -1,7 +1,7 @@
// Copyright 2017-2020 @polkadot/util authors & contributors
// SPDX-License-Identifier: Apache-2.0
import { SiDef, ToBn } from '../types';
import type { SiDef, ToBn } from '../types';
import BN from 'bn.js';
+1 -1
View File
@@ -1,7 +1,7 @@
// Copyright 2017-2020 @polkadot/ui-util authors & contributors
// SPDX-License-Identifier: Apache-2.0
import { ToBn } from '../types';
import type { ToBn } from '../types';
import BN from 'bn.js';
+1 -1
View File
@@ -1,7 +1,7 @@
// Copyright 2017-2020 @polkadot/util authors & contributors
// SPDX-License-Identifier: Apache-2.0
import { ToBn } from '../types';
import type { ToBn } from '../types';
import BN from 'bn.js';
+1 -1
View File
@@ -1,7 +1,7 @@
// Copyright 2017-2020 @polkadot/util authors & contributors
// SPDX-License-Identifier: Apache-2.0
import { SiDef } from '../types';
import type { SiDef } from '../types';
export const SI_MID = 8;
+2 -1
View File
@@ -1,11 +1,12 @@
// Copyright 2017-2020 @polkadot/util authors & contributors
// SPDX-License-Identifier: Apache-2.0
import type { ToBnOptions } from '../types';
import BN from 'bn.js';
import { isBoolean } from '../is/boolean';
import { hexStripPrefix } from './stripPrefix';
import { ToBnOptions } from '../types';
function reverse (value: string): string {
return (value.match(/.{1,2}/g) || [])
+1 -1
View File
@@ -1,7 +1,7 @@
// Copyright 2017-2020 @polkadot/util authors & contributors
// SPDX-License-Identifier: Apache-2.0
import { Constructor } from '../types';
import type { Constructor } from '../types';
/**
* @name isChildClass
+1 -1
View File
@@ -1,7 +1,7 @@
// Copyright 2017-2020 @polkadot/util authors & contributors
// SPDX-License-Identifier: Apache-2.0
import { ToBn } from '../types';
import type { ToBn } from '../types';
import { isFunction } from './function';
+1 -1
View File
@@ -1,7 +1,7 @@
// Copyright 2017-2020 @polkadot/util authors & contributors
// SPDX-License-Identifier: Apache-2.0
import { Logger } from './types';
import type { Logger } from './types';
import BN from 'bn.js';
+1 -1
View File
@@ -1,7 +1,7 @@
// Copyright 2017-2020 @polkadot/util authors & contributors
// SPDX-License-Identifier: Apache-2.0
import { Logger, Logger$Data } from './types';
import type { Logger, Logger$Data } from './types';
import { formatDate } from './format/formatDate';
import { isBn } from './is/bn';
+2 -1
View File
@@ -1,11 +1,12 @@
// Copyright 2017-2020 @polkadot/util authors & contributors
// SPDX-License-Identifier: Apache-2.0
import type { ToBnOptions } from '../types';
import BN from 'bn.js';
import { hexToBn } from '../hex/toBn';
import { u8aToHex } from './toHex';
import { ToBnOptions } from '../types';
/**
* @name u8aToBn