export type LockInitResponse = { writeAndUnlock: (data: string) => Promise; unlock: () => Promise; }; type LockInitSyncResponse = { writeAndUnlock: (data: string) => void; unlock: () => void; }; export declare const noop: () => void; export declare const asyncNoop: () => Promise; /** * *This method exists as a separate function so it can be used by ConfigFile OR outside of ConfigFile. * * @param filePath where to save the file * @returns 2 functions: * - writeAndUnlock: a function that takes the data to write and writes it to the file, then unlocks the file whether write succeeded or not * - unlock: a function that unlocks the file (in case you don't end up calling writeAndUnlock) */ export declare const lockInit: (filePath: string) => Promise; /** * prefer async {@link lockInit}. * See its documentation for details. */ export declare const lockInitSync: (filePath: string) => LockInitSyncResponse; /** * Poll until the file is unlocked. * * @param filePath file path to check */ export declare const pollUntilUnlock: (filePath: string) => Promise; export declare const pollUntilUnlockSync: (filePath: string) => void; export {};