Skip to content

Commit

Permalink
Fix TS types
Browse files Browse the repository at this point in the history
  • Loading branch information
sebelga committed May 17, 2022
1 parent 0042091 commit 88c203d
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ export function mapHitSource(
attributes: SavedObjectAttributes;
id: string;
references: SavedObjectReference[];
updatedAt: string;
updatedAt?: string;
}
) {
const newAttributes: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* Side Public License, v 1.
*/

import { SavedObject } from '@kbn/core/types/saved_objects';
import type { SimpleSavedObject } from '@kbn/core/public';
import { BaseVisType } from './base_vis_type';

export type VisualizationStage = 'experimental' | 'beta' | 'production';
Expand All @@ -30,7 +30,7 @@ export interface VisualizationListItem {
export interface VisualizationsAppExtension {
docTypes: string[];
searchFields?: string[];
toListItem: (savedObject: SavedObject) => VisualizationListItem;
toListItem: (savedObject: SimpleSavedObject) => VisualizationListItem;
}

export interface VisTypeAlias {
Expand Down
5 changes: 2 additions & 3 deletions x-pack/plugins/maps/common/map_saved_object_type.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@
*/

/* eslint-disable @typescript-eslint/consistent-type-definitions */

import { SavedObject } from '@kbn/core/types/saved_objects';
import type { SimpleSavedObject } from '@kbn/core/public';

export type MapSavedObjectAttributes = {
title: string;
Expand All @@ -17,4 +16,4 @@ export type MapSavedObjectAttributes = {
uiStateJSON?: string;
};

export type MapSavedObject = SavedObject<MapSavedObjectAttributes>;
export type MapSavedObject = SimpleSavedObject<MapSavedObjectAttributes>;

0 comments on commit 88c203d

Please sign in to comment.