Skip to content

Fix type errors in Visualization Builder #3025

@tmarkley

Description

@tmarkley

Task for #1660

PR: (many PRs)

Code owners can you help address this?
@ashwin-pc @abbyhu2000

There were also many instances of implicit any that I temporarily fixed in #3022:

https://github.com/opensearch-project/OpenSearch-Dashboards/pull/3022/files#diff-352c660687bf179d2b9b6571083659d169ceb9333a8e65a6628d7f713133c27e

$ tsc --noEmit
...

src/plugins/vis_builder/public/embeddable/disabled_embeddable.tsx:11:10 - error TS2724: '"./vis_builder_embeddable"' has no exported member named 'VisBuilderInput'. Did you mean 'VisBuilderOutput'?

11 import { VisBuilderInput, VISBUILDER_EMBEDDABLE } from './vis_builder_embeddable';
            ~~~~~~~~~~~~~~~

src/plugins/vis_builder/public/plugin.ts:135:13 - error TS2322: Type 'string | number | boolean | SavedObjectAttributes | SavedObjectAttributeSingle[]' is not assignable to type 'string | undefined'.
  Type 'number' is not assignable to type 'string'.

135             description: attributes?.description!,
                ~~~~~~~~~~~

  src/plugins/visualizations/public/vis_types/vis_type_alias_registry.ts:43:3
    43   description?: string;
         ~~~~~~~~~~~
    The expected type comes from property 'description' which is declared here on type 'VisualizationListItem'

src/plugins/vis_builder/public/plugin.ts:142:13 - error TS2322: Type 'string | number | boolean | SavedObjectAttributes | SavedObjectAttributeSingle[]' is not assignable to type 'string'.
  Type 'number' is not assignable to type 'string'.

142             title: attributes?.title!,
                ~~~~~

  src/plugins/visualizations/public/vis_types/vis_type_alias_registry.ts:42:3
    42   title: string;
         ~~~~~
    The expected type comes from property 'title' which is declared here on type 'VisualizationListItem'

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions