Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -347,7 +347,7 @@ export type BlockValueProp<T> = Extract<BlockValueType, { type: T }>;
export interface CustomBlockComponentProps<T extends BlockValueTypeKeys> {
renderComponent: () => JSX.Element | null;
blockMap: BlockMapType;
blockValue: T extends BlockValueType ? BlockValueProp<T> : BaseValueType;
Copy link
Contributor Author

@sorcererxw sorcererxw Aug 25, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since BlockValueTypeKeys is union of string, but BlockValueType not, T would never match BlockValueTypeKeys & BlockValueType

blockValue: T extends BlockValueTypeKeys ? BlockValueProp<T> : BaseValueType;
level: number;
}

Expand Down