Rollback unarrowing of the getKcContextMock return type
This commit is contained in:
@ -47,9 +47,7 @@ export function createGetKcContextMock<
|
||||
>(params: {
|
||||
pageId: PageId;
|
||||
overrides?: DeepPartial<Extract<KcContext, { pageId: PageId }>>;
|
||||
// NOTE: We choose to have a return type less precise than Extract<KcContext, { pageId: PageId }> {
|
||||
// because we want to be able to use the mock just as the real KcContext.
|
||||
}): KcContext {
|
||||
}): Extract<KcContext, { pageId: PageId }> {
|
||||
const { pageId, overrides } = params;
|
||||
|
||||
const kcContextMock = structuredCloneButFunctions(
|
||||
|
Reference in New Issue
Block a user