Skip to content

Commit

Permalink
chore: lint
Browse files Browse the repository at this point in the history
  • Loading branch information
javadkh2 committed May 31, 2024
1 parent 452ed4f commit d6e58d1
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 14 deletions.
19 changes: 9 additions & 10 deletions packages/libs/client-utils/src/core/utils/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,26 +8,25 @@ export type IfAny<T, Y, N> = 0 extends 1 & T ? Y : N;
export type First<T extends Any[]> = T extends [infer One]
? One
: T extends [infer HD, ...Any[]]
? HD
: never;
? HD
: never;

// eslint-disable-next-line @typescript-eslint/no-unused-vars
export type Tail<T extends Any[]> = T extends [infer _]
? []
: // eslint-disable-next-line @typescript-eslint/no-unused-vars
T extends [infer _, ...infer TL]
? TL
: never;
T extends [infer _, ...infer TL]
? TL
: never;

export type Prettify<T> = {
[K in keyof T]: T[K];
} & {};

export type Assert<T, U> = (<V>() => V extends T ? 1 : 2) extends <
V,
>() => V extends U ? 1 : 2
? true
: { error: 'Types are not equal'; received: T; expected: U };
export type Assert<T, U> =
(<V>() => V extends T ? 1 : 2) extends <V>() => V extends U ? 1 : 2
? true
: { error: 'Types are not equal'; received: T; expected: U };

export type UnionToIntersection<T> = (
T extends unknown ? (k: T) => void : never
Expand Down
8 changes: 4 additions & 4 deletions packages/tools/kadena-cli/src/utils/helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -102,8 +102,8 @@ export const passwordPromptTransform =
useStdin === true && (passwordFile === '-' || passwordFile === undefined)
? (args.stdin as string | null)
: typeof passwordFile === 'string'
? await services.filesystem.readFile(passwordFile)
: passwordFile._password;
? await services.filesystem.readFile(passwordFile)
: passwordFile._password;

if (password === null) {
throw new CommandError({
Expand Down Expand Up @@ -142,8 +142,8 @@ export const mnemonicPromptTransform =
filepath === '-' || filepath === undefined
? (args.stdin as string | null)
: typeof filepath === 'string'
? await services.filesystem.readFile(filepath)
: filepath._secret;
? await services.filesystem.readFile(filepath)
: filepath._secret;

if (content === null) {
throw new CommandError({
Expand Down

0 comments on commit d6e58d1

Please sign in to comment.