Use import type (#406)

This commit is contained in:
Jaco Greeff
2020-12-01 13:33:48 +01:00
committed by GitHub
parent 57eece03d8
commit 487c638185
43 changed files with 68 additions and 64 deletions
+4 -4
View File
@@ -1,10 +1,10 @@
// Copyright 2017-2020 @polkadot/ui-keyring authors & contributors
// SPDX-License-Identifier: Apache-2.0
import { KeyringInstance, KeyringPair } from '@polkadot/keyring/types';
import { Prefix } from '@polkadot/util-crypto/address/types';
import { AddressSubject } from './observable/types';
import { KeyringOptions, KeyringStore } from './types';
import type { KeyringInstance, KeyringPair } from '@polkadot/keyring/types';
import type { Prefix } from '@polkadot/util-crypto/address/types';
import type { AddressSubject } from './observable/types';
import type { KeyringOptions, KeyringStore } from './types';
import { createTestKeyring } from '@polkadot/keyring/testing';
import { isBoolean, isString } from '@polkadot/util';
+4 -4
View File
@@ -1,10 +1,10 @@
// Copyright 2017-2020 @polkadot/ui-keyring authors & contributors
// SPDX-License-Identifier: Apache-2.0
import { KeyringPair, KeyringPair$Meta, KeyringPair$Json } from '@polkadot/keyring/types';
import { KeypairType } from '@polkadot/util-crypto/types';
import { AddressSubject, SingleAddress } from './observable/types';
import { CreateResult, KeyringAddress, KeyringAddressType, KeyringItemType, KeyringJson, KeyringJson$Meta, KeyringOptions, KeyringStruct } from './types';
import type { KeyringPair, KeyringPair$Meta, KeyringPair$Json } from '@polkadot/keyring/types';
import type { KeypairType } from '@polkadot/util-crypto/types';
import type { AddressSubject, SingleAddress } from './observable/types';
import type { CreateResult, KeyringAddress, KeyringAddressType, KeyringItemType, KeyringJson, KeyringJson$Meta, KeyringOptions, KeyringStruct } from './types';
import BN from 'bn.js';
import { createPair } from '@polkadot/keyring/pair';
@@ -1,8 +1,8 @@
// Copyright 2017-2020 @polkadot/ui-keyring authors & contributors
// SPDX-License-Identifier: Apache-2.0
import { SubjectInfo, AddressSubject, SingleAddress } from './types';
import { KeyringJson, KeyringStore } from '../types';
import type { SubjectInfo, AddressSubject, SingleAddress } from './types';
import type { KeyringJson, KeyringStore } from '../types';
import { BehaviorSubject } from 'rxjs';
+1 -1
View File
@@ -1,7 +1,7 @@
// Copyright 2017-2020 @polkadot/ui-keyring authors & contributors
// SPDX-License-Identifier: Apache-2.0
import { SubjectInfo } from './types';
import type { SubjectInfo } from './types';
import { combineLatest } from 'rxjs';
import { map } from 'rxjs/operators';
+3 -3
View File
@@ -1,9 +1,9 @@
// Copyright 2017-2020 @polkadot/ui-keyring authors & contributors
// SPDX-License-Identifier: Apache-2.0
import { BehaviorSubject } from 'rxjs';
import { KeyringSectionOption } from '../options/types';
import { KeyringJson, KeyringStore } from '../types';
import type { BehaviorSubject } from 'rxjs';
import type { KeyringSectionOption } from '../options/types';
import type { KeyringJson, KeyringStore } from '../types';
export interface SingleAddress {
json: KeyringJson;
@@ -1,7 +1,8 @@
// Copyright 2017-2020 @polkadot/ui-keyring authors & contributors
// SPDX-License-Identifier: Apache-2.0
import { KeyringStruct } from '../types';
import type { KeyringStruct } from '../types';
import { KeyringOption } from '.';
const keyringOption = new KeyringOption();
+3 -3
View File
@@ -1,9 +1,9 @@
// Copyright 2017-2020 @polkadot/ui-keyring authors & contributors
// SPDX-License-Identifier: Apache-2.0
import { KeyringStruct } from '../types';
import { SingleAddress } from '../observable/types';
import { KeyringOptions, KeyringOptionInstance, KeyringSectionOption, KeyringSectionOptions } from './types';
import type { KeyringStruct } from '../types';
import type { SingleAddress } from '../observable/types';
import type { KeyringOptions, KeyringOptionInstance, KeyringSectionOption, KeyringSectionOptions } from './types';
import { BehaviorSubject } from 'rxjs';
import { assert } from '@polkadot/util';
+1 -1
View File
@@ -1,7 +1,7 @@
// Copyright 2017-2020 @polkadot/ui-keyring authors & contributors
// SPDX-License-Identifier: Apache-2.0
import { KeyringSectionOption } from './types';
import type { KeyringSectionOption } from './types';
import { isUndefined } from '@polkadot/util';
+1 -1
View File
@@ -1,7 +1,7 @@
// Copyright 2017-2020 @polkadot/ui-keyring authors & contributors
// SPDX-License-Identifier: Apache-2.0
import { KeyringItemType, KeyringStruct } from '../types';
import type { KeyringItemType, KeyringStruct } from '../types';
export interface KeyringSectionOption {
key: string | null;
+1 -1
View File
@@ -1,7 +1,7 @@
// Copyright 2017-2020 @polkadot/ui-keyring authors & contributors
// SPDX-License-Identifier: Apache-2.0
import { KeyringStore, KeyringJson } from '../types';
import type { KeyringStore, KeyringJson } from '../types';
import store from 'store';
+1 -1
View File
@@ -1,7 +1,7 @@
// Copyright 2017-2020 @polkadot/ui-keyring authors & contributors
// SPDX-License-Identifier: Apache-2.0
import { KeyringStore, KeyringJson } from '../types';
import type { KeyringStore, KeyringJson } from '../types';
import fs from 'fs';
import mkdirp from 'mkdirp';
+4 -4
View File
@@ -1,10 +1,10 @@
// Copyright 2017-2020 @polkadot/ui-keyring authors & contributors
// SPDX-License-Identifier: Apache-2.0
import { Hash } from '@polkadot/types/interfaces';
import { KeyringInstance as BaseKeyringInstance, KeyringPair, KeyringPair$Meta, KeyringPair$Json, KeyringOptions as KeyringOptionsBase } from '@polkadot/keyring/types';
import { KeypairType } from '@polkadot/util-crypto/types';
import { AddressSubject, SingleAddress } from './observable/types';
import type { Hash } from '@polkadot/types/interfaces';
import type { KeyringInstance as BaseKeyringInstance, KeyringPair, KeyringPair$Meta, KeyringPair$Json, KeyringOptions as KeyringOptionsBase } from '@polkadot/keyring/types';
import type { KeypairType } from '@polkadot/util-crypto/types';
import type { AddressSubject, SingleAddress } from './observable/types';
export interface ContractMeta {
abi: string;