Skip to content

Commit

Permalink
use freeze to speed up the process
Browse files Browse the repository at this point in the history
  • Loading branch information
mshustov committed May 6, 2021
1 parent 0298d1e commit afc2709
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
4 changes: 1 addition & 3 deletions src/core/server/ui_settings/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@
* in compliance with, at your election, the Elastic License 2.0 or the Server
* Side Public License, v 1.
*/
import type { RecursiveReadonly } from '@kbn/utility-types';

import { SavedObjectsClientContract } from '../saved_objects/types';
import { UiSettingsParams, UserProvidedValues, PublicUiSettingsParams } from '../../types';
export type {
Expand Down Expand Up @@ -41,7 +39,7 @@ export interface IUiSettingsClient {
/**
* Retrieves a set of all uiSettings values set by the user with fallbacks to default values if not specified.
*/
getAll: <T = any>() => Promise<RecursiveReadonly<Record<string, T>>>;
getAll: <T = any>() => Promise<Record<string, T>>;
/**
* Retrieves a set of all uiSettings values set by the user.
*/
Expand Down
3 changes: 1 addition & 2 deletions src/core/server/ui_settings/ui_settings_client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
*/

import { omit } from 'lodash';
import { deepFreeze } from '@kbn/std';

import { SavedObjectsErrorHelpers } from '../saved_objects';
import { SavedObjectsClientContract } from '../saved_objects/types';
Expand Down Expand Up @@ -87,7 +86,7 @@ export class UiSettingsClient implements IUiSettingsClient {
}
});

deepFreeze(result);
Object.freeze(result);
return result as Record<string, T>;
}

Expand Down

0 comments on commit afc2709

Please sign in to comment.