import { DataService } from '../metadata/data-service.js'; /** Configuration info to be passed to the {@link SaveOptions} constructor */ export interface SaveOptionsConfig { /** Resource name to be used during the save - this defaults to "SaveChanges" */ resourceName?: string; /** The DataService to be used for this save. */ dataService?: DataService; /** Whether multiple saves can be in-flight at the same time. The default is false. */ allowConcurrentSaves?: boolean; /** Free form value that will be sent to the server during the save. */ tag?: any; } /** A SaveOptions instance is used to specify the 'options' under which a save will occur. */ export declare class SaveOptions { /** Resource name to be used during the save - this defaults to "SaveChanges". __Read Only__ */ resourceName: string; /** The DataService to be used for this save. __Read Only__ */ dataService: DataService; /** Whether multiple saves can be in-flight at the same time. The default is false. __Read Only__ */ allowConcurrentSaves: boolean; /** Free form value that will be sent to the server during the save. __Read Only__ */ tag: any; /** The default value whenever SaveOptions are not specified. */ static defaultInstance: SaveOptions; /** Creates save options from a {@link SaveOptionsConfig}. Passed to {@link EntityManager.saveChanges}, they are used for that save in place of the manager's {@link EntityManager.saveOptions} - as a whole, not merged with them setting by setting. ```ts const so = new SaveOptions({ allowConcurrentSaves: true }); em.saveChanges(null, so); ``` */ constructor(config?: SaveOptionsConfig); /** Sets the 'defaultInstance' by creating a copy of the current 'defaultInstance' and then applying all of the properties of the current instance. The current instance is returned unchanged. */ setAsDefault(): any; /** Returns a copy of this SaveOptions with the specified config options applied. ```ts var saveOptions = em1.saveOptions.using( {resourceName: "anotherResource" }); ``` */ using(config: SaveOptionsConfig): SaveOptions; }