Skip to content

Commit

Permalink
fix: resolves unneeded todos
Browse files Browse the repository at this point in the history
  • Loading branch information
Figedi committed Jul 23, 2023
1 parent 1e50be5 commit 500ace0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/app/ApplicationBuilder.ts
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ const $env: EnvalidTransformer = {
url,
json,
file,
any: env, // @todo resolve legacy naming
any: env,
ref,
};

Expand Down Expand Up @@ -491,7 +491,7 @@ export class ApplicationBuilder<Config> {
return;
}
const baseArgs = command.info.argv({
$arg: <O extends AllOptions>(opts: O) => ({ ...(opts as any), __type: "opt" } as InferredOptionType<O>),
$arg: <O extends AllOptions>(opts: O) => ({ ...(opts as any), __type: "opt" }) as InferredOptionType<O>,
}) as Record<string, AllOptions>;

const isArgvType = (v: any) => "__type" in v && v.__type === "opt";
Expand Down
1 change: 0 additions & 1 deletion src/app/types/args.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ type IsUnknown<T> = IsAny<T> extends true ? false : unknown extends T ? true : f

type IsRequiredOrHasDefault<O extends AllOptions> = O extends { required: true } ? true : false;

// @todo there is only type, alias, default, not required, thus everything is optional, aaaaaaaaarg
export type InferredOptionType<O extends AllOptions> =
// Handle special cases first

Expand Down

0 comments on commit 500ace0

Please sign in to comment.