refactor(editor): enable the noUncheckedIndexedAccess rule for the block-database package (#9691)

close: BS-2269
This commit is contained in:
zzj3720
2025-01-14 14:35:46 +00:00
parent aa2a8fbf9b
commit ff295f383f
24 changed files with 324 additions and 344 deletions

View File

@@ -31,7 +31,7 @@ type Create<
};
export type PropertyModel<
Type extends string = string,
PropertyData extends Record<string, unknown> = Record<string, never>,
PropertyData extends Record<string, unknown> = Record<string, unknown>,
CellData = unknown,
> = {
type: Type;

View File

@@ -38,12 +38,7 @@ export type PropertyConfig<
value?: Value;
}>
) => unknown[];
cellToString: (
config: WithCommonPropertyConfig<{
value: Value;
data: Data;
}>
) => string;
cellToString: (config: { value: Value; data: Data }) => string;
cellFromString: (
config: WithCommonPropertyConfig<{
value: string;

View File

@@ -286,7 +286,6 @@ export abstract class SingleViewBase<
this.dataSource.propertyMetaGet(type).config.cellToString({
value: this.dataSource.cellValueGet(rowId, propertyId),
data: this.propertyDataGet(propertyId),
dataSource: this.dataSource,
}) ?? ''
);
}