mirror of
https://github.com/toeverything/AFFiNE.git
synced 2024-12-23 12:52:20 +03:00
chore: remove property correct
This commit is contained in:
parent
91781b4d75
commit
29d5a8c971
@ -248,10 +248,8 @@ export const getRecastItemValue = (block: RecastItem | AsyncBlock) => {
|
||||
};
|
||||
|
||||
const removeValue = (propertyId: RecastPropertyId) => {
|
||||
return recastItem.setProperty(TABLE_VALUES_KEY, {
|
||||
...props,
|
||||
[propertyId]: null,
|
||||
});
|
||||
const { [propertyId]: omitted, ...restProps } = props;
|
||||
return recastItem.setProperty(TABLE_VALUES_KEY, restProps);
|
||||
};
|
||||
return { getAllValue, getValue, setValue, removeValue };
|
||||
};
|
||||
|
@ -18,6 +18,7 @@ type VariantBlock<Props> = Omit<
|
||||
value: Props[T]
|
||||
): Promise<boolean>;
|
||||
setProperties(value: Partial<Props>): Promise<boolean>;
|
||||
removeProperty<T extends keyof Props>(key: T): Promise<boolean>;
|
||||
};
|
||||
|
||||
export type RecastBlock = VariantBlock<RecastDataProperties>;
|
||||
|
Loading…
Reference in New Issue
Block a user