Skip to content

Commit

Permalink
formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
kuhe committed Nov 14, 2024
1 parent 9302f94 commit 71c24de
Showing 1 changed file with 14 additions and 14 deletions.
28 changes: 14 additions & 14 deletions packages/types/src/transform/no-undefined.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import type { InvokeMethod, InvokeMethodOptionalArgs } from "../client";
import type { GetOutputType } from "../command";
import type { DocumentType } from "../shapes"
import type { DocumentType } from "../shapes";

/**
* @public
Expand Down Expand Up @@ -34,14 +34,14 @@ export type UncheckedClient<Client extends object> = UncheckedClientOutputTypes<
* Excludes undefined recursively.
*/
export type NoUndefined<T> = T extends Function
? T
? T
: T extends DocumentType
? T
: [T] extends [object]
? {
[key in keyof T]: NoUndefined<T[key]>;
}
: Exclude<T, undefined>;
? T
: [T] extends [object]
? {
[key in keyof T]: NoUndefined<T[key]>;
}
: Exclude<T, undefined>;

/**
* @internal
Expand All @@ -51,12 +51,12 @@ export type NoUndefined<T> = T extends Function
export type RecursiveRequired<T> = T extends Function
? T
: T extends DocumentType
? T
: [T] extends [object]
? {
[key in keyof T]-?: RecursiveRequired<T[key]>;
}
: Exclude<T, undefined>;
? T
: [T] extends [object]
? {
[key in keyof T]-?: RecursiveRequired<T[key]>;
}
: Exclude<T, undefined>;

/**
* @internal
Expand Down

0 comments on commit 71c24de

Please sign in to comment.