Skip to content

Commit fa9fef7

Browse files
committed
test: fix channel generator type
1 parent 29d1b2e commit fa9fef7

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

src/mock-builders/generator/channel.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { nanoid } from 'nanoid';
22
import type { ChannelAPIResponse, ChannelConfigWithInfo } from 'stream-chat';
3-
import type { DeepPartial } from '../../../../stream-chat-js/src/types.utility';
3+
import type { DeepPartial } from '../../types/types';
44

55
export const generateChannel = (options?: DeepPartial<ChannelAPIResponse>) => {
66
const { channel: optionsChannel, ...optionsBesidesChannel } =

src/types/types.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,3 +78,7 @@ export type PartialSelected<T, K extends keyof T> = Omit<T, K> & Partial<Pick<T,
7878
export type DeepRequired<T> = {
7979
[K in keyof T]-?: T[K] extends object ? DeepRequired<T[K]> : T[K];
8080
};
81+
82+
export type DeepPartial<T> = {
83+
[P in keyof T]?: T[P] extends object ? DeepPartial<T[P]> : T[P];
84+
};

0 commit comments

Comments
 (0)