fixed compilation error

This commit is contained in:
Jan Prochazka
2023-02-17 08:46:31 +01:00
parent 1365f2b47c
commit 6a0feb235a

View File

@@ -22,15 +22,18 @@ export interface ChangeSetItem {
fields?: { [column: string]: string }; fields?: { [column: string]: string };
} }
export interface ChangeSet { export interface ChangeSetItemFields {
structure?: TableInfo;
dataUpdateCommands?: JsonDataObjectUpdateCommand[];
setColumnMode?: 'fixed' | 'variable';
inserts: ChangeSetItem[]; inserts: ChangeSetItem[];
updates: ChangeSetItem[]; updates: ChangeSetItem[];
deletes: ChangeSetItem[]; deletes: ChangeSetItem[];
} }
export interface ChangeSet extends ChangeSetItemFields {
structure?: TableInfo;
dataUpdateCommands?: JsonDataObjectUpdateCommand[];
setColumnMode?: 'fixed' | 'variable';
}
export function createChangeSet(): ChangeSet { export function createChangeSet(): ChangeSet {
return { return {
inserts: [], inserts: [],
@@ -55,7 +58,7 @@ export interface ChangeSetFieldDefinition extends ChangeSetRowDefinition {
export function findExistingChangeSetItem( export function findExistingChangeSetItem(
changeSet: ChangeSet, changeSet: ChangeSet,
definition: ChangeSetRowDefinition definition: ChangeSetRowDefinition
): [keyof ChangeSet, ChangeSetItem] { ): [keyof ChangeSetItemFields, ChangeSetItem] {
if (!changeSet || !definition) return ['updates', null]; if (!changeSet || !definition) return ['updates', null];
if (definition.insertedRowIndex != null) { if (definition.insertedRowIndex != null) {
return [ return [