From 22fb9a4dfe6b92b255de783c9c2597886e896430 Mon Sep 17 00:00:00 2001 From: Paul Venable Date: Thu, 3 Aug 2023 21:15:46 -0700 Subject: [PATCH] Remove Guaranteed from CellSuccessData --- packages/web/src/components/createCell.tsx | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/packages/web/src/components/createCell.tsx b/packages/web/src/components/createCell.tsx index e8079f129632..8caf36152363 100644 --- a/packages/web/src/components/createCell.tsx +++ b/packages/web/src/components/createCell.tsx @@ -71,16 +71,8 @@ export type CellFailureProps = { updating?: boolean } -// aka guarantee that all properties in T exist -// This is necessary for Cells, because if it doesn't exist it'll go to Empty or Failure -type Guaranteed = { - [K in keyof T]-?: NonNullable -} - /** * Use this type, if you are forwarding on the data from your Cell's Success component - * Because Cells automatically checks for "empty", or "errors" - if you receive the data type in your - * Success component, it means the data is guaranteed (and non-optional) * * @params TData = Type of data based on your graphql query. This can be imported from 'types/graphql' * @example @@ -88,10 +80,8 @@ type Guaranteed = { * * const { post } = CellSuccessData * - * post.id // post is non optional, so no need to do post?.id - * */ -export type CellSuccessData = Omit, '__typename'> +export type CellSuccessData = Omit /** * @MARK not sure about this partial, but we need to do this for tests and storybook.