From b8f01d6f392e50a7759c91af4962f4f9322c7196 Mon Sep 17 00:00:00 2001 From: Michael J Feher Date: Fri, 11 Aug 2023 19:28:03 -0500 Subject: [PATCH] chore: optimize imports --- examples/helloworld/client.ts | 11 ++++++----- examples/lifecycle/client.ts | 11 ++++++----- examples/state/client.ts | 11 ++++++----- examples/voting/client.ts | 11 ++++++----- src/client/imports.ts | 11 ++++++----- 5 files changed, 30 insertions(+), 25 deletions(-) diff --git a/examples/helloworld/client.ts b/examples/helloworld/client.ts index cdc8adf..c338de8 100644 --- a/examples/helloworld/client.ts +++ b/examples/helloworld/client.ts @@ -5,7 +5,7 @@ * requires: @algorandfoundation/algokit-utils: ^2 */ import * as algokit from '@algorandfoundation/algokit-utils' -import { +import type { AppCallTransactionResult, AppCallTransactionResultOfType, CoreAppCallArgs, @@ -14,16 +14,17 @@ import { TealTemplateParams, ABIAppCallArg, } from '@algorandfoundation/algokit-utils/types/app' -import { +import type { AppClientCallCoreParams, AppClientCompilationParams, AppClientDeployCoreParams, AppDetails, ApplicationClient, } from '@algorandfoundation/algokit-utils/types/app-client' -import { AppSpec } from '@algorandfoundation/algokit-utils/types/app-spec' -import { SendTransactionResult, TransactionToSign, SendTransactionFrom } from '@algorandfoundation/algokit-utils/types/transaction' -import { Algodv2, OnApplicationComplete, Transaction, TransactionWithSigner, AtomicTransactionComposer } from 'algosdk' +import type { AppSpec } from '@algorandfoundation/algokit-utils/types/app-spec' +import type { SendTransactionResult, TransactionToSign, SendTransactionFrom } from '@algorandfoundation/algokit-utils/types/transaction' +import type { TransactionWithSigner } from 'algosdk' +import { Algodv2, OnApplicationComplete, Transaction, AtomicTransactionComposer } from 'algosdk' export const APP_SPEC: AppSpec = { "hints": { "hello(string)string": { diff --git a/examples/lifecycle/client.ts b/examples/lifecycle/client.ts index 4cb8b65..341a168 100644 --- a/examples/lifecycle/client.ts +++ b/examples/lifecycle/client.ts @@ -5,7 +5,7 @@ * requires: @algorandfoundation/algokit-utils: ^2 */ import * as algokit from '@algorandfoundation/algokit-utils' -import { +import type { AppCallTransactionResult, AppCallTransactionResultOfType, CoreAppCallArgs, @@ -14,16 +14,17 @@ import { TealTemplateParams, ABIAppCallArg, } from '@algorandfoundation/algokit-utils/types/app' -import { +import type { AppClientCallCoreParams, AppClientCompilationParams, AppClientDeployCoreParams, AppDetails, ApplicationClient, } from '@algorandfoundation/algokit-utils/types/app-client' -import { AppSpec } from '@algorandfoundation/algokit-utils/types/app-spec' -import { SendTransactionResult, TransactionToSign, SendTransactionFrom } from '@algorandfoundation/algokit-utils/types/transaction' -import { Algodv2, OnApplicationComplete, Transaction, TransactionWithSigner, AtomicTransactionComposer } from 'algosdk' +import type { AppSpec } from '@algorandfoundation/algokit-utils/types/app-spec' +import type { SendTransactionResult, TransactionToSign, SendTransactionFrom } from '@algorandfoundation/algokit-utils/types/transaction' +import type { TransactionWithSigner } from 'algosdk' +import { Algodv2, OnApplicationComplete, Transaction, AtomicTransactionComposer } from 'algosdk' export const APP_SPEC: AppSpec = { "hints": { "hello(string)string": { diff --git a/examples/state/client.ts b/examples/state/client.ts index 31a3362..f558a12 100644 --- a/examples/state/client.ts +++ b/examples/state/client.ts @@ -5,7 +5,7 @@ * requires: @algorandfoundation/algokit-utils: ^2 */ import * as algokit from '@algorandfoundation/algokit-utils' -import { +import type { AppCallTransactionResult, AppCallTransactionResultOfType, CoreAppCallArgs, @@ -14,16 +14,17 @@ import { TealTemplateParams, ABIAppCallArg, } from '@algorandfoundation/algokit-utils/types/app' -import { +import type { AppClientCallCoreParams, AppClientCompilationParams, AppClientDeployCoreParams, AppDetails, ApplicationClient, } from '@algorandfoundation/algokit-utils/types/app-client' -import { AppSpec } from '@algorandfoundation/algokit-utils/types/app-spec' -import { SendTransactionResult, TransactionToSign, SendTransactionFrom } from '@algorandfoundation/algokit-utils/types/transaction' -import { Algodv2, OnApplicationComplete, Transaction, TransactionWithSigner, AtomicTransactionComposer } from 'algosdk' +import type { AppSpec } from '@algorandfoundation/algokit-utils/types/app-spec' +import type { SendTransactionResult, TransactionToSign, SendTransactionFrom } from '@algorandfoundation/algokit-utils/types/transaction' +import type { TransactionWithSigner } from 'algosdk' +import { Algodv2, OnApplicationComplete, Transaction, AtomicTransactionComposer } from 'algosdk' export const APP_SPEC: AppSpec = { "hints": { "call_abi(string)string": { diff --git a/examples/voting/client.ts b/examples/voting/client.ts index 4e4bb27..8e61207 100644 --- a/examples/voting/client.ts +++ b/examples/voting/client.ts @@ -5,7 +5,7 @@ * requires: @algorandfoundation/algokit-utils: ^2 */ import * as algokit from '@algorandfoundation/algokit-utils' -import { +import type { AppCallTransactionResult, AppCallTransactionResultOfType, CoreAppCallArgs, @@ -14,16 +14,17 @@ import { TealTemplateParams, ABIAppCallArg, } from '@algorandfoundation/algokit-utils/types/app' -import { +import type { AppClientCallCoreParams, AppClientCompilationParams, AppClientDeployCoreParams, AppDetails, ApplicationClient, } from '@algorandfoundation/algokit-utils/types/app-client' -import { AppSpec } from '@algorandfoundation/algokit-utils/types/app-spec' -import { SendTransactionResult, TransactionToSign, SendTransactionFrom } from '@algorandfoundation/algokit-utils/types/transaction' -import { Algodv2, OnApplicationComplete, Transaction, TransactionWithSigner, AtomicTransactionComposer } from 'algosdk' +import type { AppSpec } from '@algorandfoundation/algokit-utils/types/app-spec' +import type { SendTransactionResult, TransactionToSign, SendTransactionFrom } from '@algorandfoundation/algokit-utils/types/transaction' +import type { TransactionWithSigner } from 'algosdk' +import { Algodv2, OnApplicationComplete, Transaction, AtomicTransactionComposer } from 'algosdk' export const APP_SPEC: AppSpec = { "hints": { "create(string,byte[],string,uint64,uint64,uint8[],uint64,string)void": { diff --git a/src/client/imports.ts b/src/client/imports.ts index d14ef28..2f5d31c 100644 --- a/src/client/imports.ts +++ b/src/client/imports.ts @@ -2,7 +2,7 @@ import { DocumentParts } from '../output/writer' export function* imports(): DocumentParts { yield `import * as algokit from '@algorandfoundation/algokit-utils' -import { +import type { AppCallTransactionResult, AppCallTransactionResultOfType, CoreAppCallArgs, @@ -11,14 +11,15 @@ import { TealTemplateParams, ABIAppCallArg, } from '@algorandfoundation/algokit-utils/types/app' -import { +import type { AppClientCallCoreParams, AppClientCompilationParams, AppClientDeployCoreParams, AppDetails, ApplicationClient, } from '@algorandfoundation/algokit-utils/types/app-client' -import { AppSpec } from '@algorandfoundation/algokit-utils/types/app-spec' -import { SendTransactionResult, TransactionToSign, SendTransactionFrom } from '@algorandfoundation/algokit-utils/types/transaction' -import { Algodv2, OnApplicationComplete, Transaction, TransactionWithSigner, AtomicTransactionComposer } from 'algosdk'` +import type { AppSpec } from '@algorandfoundation/algokit-utils/types/app-spec' +import type { SendTransactionResult, TransactionToSign, SendTransactionFrom } from '@algorandfoundation/algokit-utils/types/transaction' +import type { TransactionWithSigner } from 'algosdk' +import { Algodv2, OnApplicationComplete, Transaction, AtomicTransactionComposer } from 'algosdk'` }