/*!
 * Copyright (c) Microsoft Corporation and contributors. All rights reserved.
 * Licensed under the MIT License.
 */
import { strict as assert } from "assert";
export function makeEditMinter(family, editor) {
    let builtChangeset;
    const innerEditor = family.buildEditor((change) => {
        assert(builtChangeset === undefined);
        builtChangeset = change;
    });
    return () => {
        assert(builtChangeset === undefined);
        editor(innerEditor);
        assert(builtChangeset !== undefined);
        const changeset = builtChangeset;
        builtChangeset = undefined;
        return changeset;
    };
}
//# sourceMappingURL=editMinter.js.map