Skip to content

Commit

Permalink
fix policy check/lint
Browse files Browse the repository at this point in the history
  • Loading branch information
Abe27342 committed Jul 3, 2023
1 parent 5e5fc11 commit b6e4fea
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions packages/test/test-version-utils/src/compatUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,10 @@ import {
CompatApis,
} from "./testApi.js";

type Mutable<T> = {
-readonly [P in keyof T]: T[P];
};

export const TestDataObjectType = "@fluid-example/test-dataStore";

export interface ITestDataObject extends IFluidLoadable {
Expand Down Expand Up @@ -65,7 +69,9 @@ function createGetDataStoreFactoryFunction(api: ReturnType<typeof getDataRuntime
const copyAttributesBesidesPackageVersion = (
attributes: IChannelAttributes,
): Omit<IChannelAttributes, "packageVersion"> => {
const remainingAttributes = JSON.parse(JSON.stringify(attributes));
const remainingAttributes: Mutable<IChannelAttributes> = JSON.parse(
JSON.stringify(attributes),
);
delete remainingAttributes.packageVersion;
return remainingAttributes;
};
Expand Down Expand Up @@ -101,7 +107,7 @@ function createGetDataStoreFactoryFunction(api: ReturnType<typeof getDataRuntime
* });
* ```
*
* This ensures that the factory you create depends on the correct fluid runtime version for compat purposes,
* This ensures that the factory you create depends on the correct Fluid runtime version for compat purposes,
* and so the test data object's registry (which is being built here) can use your factory directly.
*/
assert.deepEqual(
Expand Down

0 comments on commit b6e4fea

Please sign in to comment.