[QRQC_2] No implicitAny in twenty-server (#12075)
# Introduction Following https://github.com/twentyhq/twenty/pull/12068 Related with https://github.com/twentyhq/core-team-issues/issues/975 We're enabling `noImplicitAny` handled few use case manually, added a `ts-expect-error` to the others, we should plan to handle them in the future
This commit is contained in:
+2
@@ -35,8 +35,10 @@ describe('mergeUserVars', () => {
|
||||
});
|
||||
|
||||
it('should merge user vars correctly when user vars are empty', () => {
|
||||
// @ts-expect-error legacy noImplicitAny
|
||||
const userVars = [];
|
||||
|
||||
// @ts-expect-error legacy noImplicitAny
|
||||
const mergedUserVars = mergeUserVars(userVars);
|
||||
|
||||
expect(mergedUserVars).toEqual(new Map());
|
||||
|
||||
@@ -129,11 +129,15 @@ export class UserResolver {
|
||||
|
||||
const grantedSettingsPermissions: SettingPermissionType[] = (
|
||||
Object.keys(settingsPermissions) as SettingPermissionType[]
|
||||
).filter((feature) => settingsPermissions[feature] === true);
|
||||
)
|
||||
// @ts-expect-error legacy noImplicitAny
|
||||
.filter((feature) => settingsPermissions[feature] === true);
|
||||
|
||||
const grantedObjectRecordsPermissions = (
|
||||
Object.keys(objectRecordsPermissions) as PermissionsOnAllObjectRecords[]
|
||||
).filter((permission) => objectRecordsPermissions[permission] === true);
|
||||
)
|
||||
// @ts-expect-error legacy noImplicitAny
|
||||
.filter((permission) => objectRecordsPermissions[permission] === true);
|
||||
|
||||
currentUserWorkspace.settingsPermissions = grantedSettingsPermissions;
|
||||
currentUserWorkspace.objectRecordsPermissions =
|
||||
|
||||
Reference in New Issue
Block a user