Skip to content

Commit

Permalink
🚨 prettier
Browse files Browse the repository at this point in the history
  • Loading branch information
coyotte508 committed May 6, 2024
1 parent dc6bc0b commit bec02d3
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 13 deletions.
15 changes: 9 additions & 6 deletions packages/hub/src/vendor/type-fest/entry.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,12 @@ const setEntryNumber: Entry<typeof setExample> = [1, 1];
@category Array
@category Set
*/
export type Entry<BaseType> =
BaseType extends Map<unknown, unknown> ? MapEntry<BaseType>
: BaseType extends Set<unknown> ? SetEntry<BaseType>
: BaseType extends readonly unknown[] ? ArrayEntry<BaseType>
: BaseType extends object ? ObjectEntry<BaseType>
: never;
export type Entry<BaseType> = BaseType extends Map<unknown, unknown>
? MapEntry<BaseType>
: BaseType extends Set<unknown>
? SetEntry<BaseType>
: BaseType extends readonly unknown[]
? ArrayEntry<BaseType>
: BaseType extends object
? ObjectEntry<BaseType>
: never;
13 changes: 6 additions & 7 deletions packages/hub/src/vendor/type-fest/set-required.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type {Except} from './except';
import type {Simplify} from './simplify';
import type { Except } from "./except";
import type { Simplify } from "./simplify";

/**
Create a type that makes the given keys required. The remaining keys are kept as is. The sister of the `SetOptional` type.
Expand All @@ -26,10 +26,9 @@ type SomeRequired = SetRequired<Foo, 'b' | 'c'>;
@category Object
*/
export type SetRequired<BaseType, Keys extends keyof BaseType> =
Simplify<
export type SetRequired<BaseType, Keys extends keyof BaseType> = Simplify<
// Pick just the keys that are optional from the base type.
Except<BaseType, Keys> &
// Pick the keys that should be required from the base type and make them required.
Required<Pick<BaseType, Keys>>
>;
// Pick the keys that should be required from the base type and make them required.
Required<Pick<BaseType, Keys>>
>;

0 comments on commit bec02d3

Please sign in to comment.