Skip to content

Commit a09c1cb

Browse files
authored
fix: use import type where possible (#91)
1 parent 64c579c commit a09c1cb

File tree

7 files changed

+21
-20
lines changed

7 files changed

+21
-20
lines changed

src/endpoint.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { fetchData, insertParams, stringifyQuery } from './utils'
2-
import { paths } from './types/api'
2+
import type { paths } from './types/api'
33

44
type Primitive = string | number | boolean | null
55

src/index.ts

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,25 @@
11
import { callEndpoint } from './endpoint'
2-
import { operations } from './types/api'
3-
import {
2+
import type { operations } from './types/api'
3+
import type {
44
SafeTransactionEstimation,
55
TransactionDetails,
66
TransactionListPage,
77
SafeIncomingTransfersResponse,
88
SafeModuleTransactionsResponse,
99
SafeMultisigTransactionsResponse,
1010
} from './types/transactions'
11-
import {
11+
import type {
1212
FiatCurrencies,
1313
OwnedSafes,
1414
SafeBalanceResponse,
1515
SafeCollectibleResponse,
1616
SafeCollectiblesPage,
1717
} from './types/common'
18-
import { SafeInfo } from './types/safe-info'
19-
import { ChainListResponse, ChainInfo } from './types/chains'
20-
import { SafeAppsResponse } from './types/safe-apps'
21-
import { MasterCopyReponse } from './types/master-copies'
22-
import { DecodedDataResponse } from './types/decoded-data'
18+
import type { SafeInfo } from './types/safe-info'
19+
import type { ChainListResponse, ChainInfo } from './types/chains'
20+
import type { SafeAppsResponse } from './types/safe-apps'
21+
import type { MasterCopyReponse } from './types/master-copies'
22+
import type { DecodedDataResponse } from './types/decoded-data'
2323
import { DEFAULT_BASE_URL } from './config'
2424

2525
export * from './types/safe-info'

src/types/api.ts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
import {
1+
import type {
22
FiatCurrencies,
33
OwnedSafes,
44
SafeBalanceResponse,
55
SafeCollectibleResponse,
66
SafeCollectiblesPage,
77
} from './common'
8-
import {
8+
import type {
99
MultisigTransactionRequest,
1010
TransactionDetails,
1111
SafeTransactionEstimation,
@@ -15,11 +15,11 @@ import {
1515
SafeModuleTransactionsResponse,
1616
SafeMultisigTransactionsResponse,
1717
} from './transactions'
18-
import { SafeInfo } from './safe-info'
19-
import { ChainListResponse, ChainInfo } from './chains'
20-
import { SafeAppsResponse } from './safe-apps'
21-
import { DecodedDataRequest, DecodedDataResponse } from './decoded-data'
22-
import { MasterCopyReponse } from './master-copies'
18+
import type { SafeInfo } from './safe-info'
19+
import type { ChainListResponse, ChainInfo } from './chains'
20+
import type { SafeAppsResponse } from './safe-apps'
21+
import type { DecodedDataRequest, DecodedDataResponse } from './decoded-data'
22+
import type { MasterCopyReponse } from './master-copies'
2323

2424
export interface paths {
2525
'/v1/chains/{chainId}/safes/{address}': {

src/types/chains.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Page } from './common'
1+
import type { Page } from './common'
22

33
export enum RPC_AUTHENTICATION {
44
API_KEY_PATH = 'API_KEY_PATH',

src/types/safe-info.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { AddressEx } from './common'
1+
import type { AddressEx } from './common'
22

33
export enum ImplementationVersionState {
44
UP_TO_DATE = 'UP_TO_DATE',

src/types/transactions.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { AddressEx, Page, TokenInfo } from './common'
1+
import type { AddressEx, Page, TokenInfo } from './common'
22

33
export type ParamValue = string | ParamValue[]
44

tsconfig.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@
1414
"forceConsistentCasingInFileNames": true,
1515
"moduleResolution": "node",
1616
"resolveJsonModule": true,
17-
"isolatedModules": true
17+
"isolatedModules": true,
18+
"importsNotUsedAsValues": "error",
1819
},
1920
"include": ["src"]
2021
}

0 commit comments

Comments
 (0)