mirror of
https://github.com/elastic/kibana.git
synced 2025-06-27 18:51:07 -04:00
[DataViews] Remove some usage of any
(#135767)
* fix editor warning * use UrlFormatEditorFormatParams * remove unnecessary any * remove any from FieldFormatEditorFactory * remove usage of any from src/plugins/data_view_field_editor * remove usage of any from data_views/server/fetcher * fix ts * fix more ts * back off changes in src/plugins/data_views/server/fetcher/ * pretty * remove some unknown * pretty * fix ts * retain null-ability * fix lint * fix test * cleanup * fixes in FieldFormatEditorFactory * cleanup * fix FieldFormatEditorStart * revert functional diff * knock out a few small any * fix lint * set up generic FieldFormatParams, SerializedFieldFormat, FormatFactory * revert comment * fix mistake * use FormatEditorServiceSetup, FormatEditorServiceStart * make defaultFieldFormatEditorFactories more type safe * simplify types * type fixes * roll back re-leveling of fieldFormatEditors * review feedback item * public api correction Co-authored-by: Matt Kime <matt@mattki.me> Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
This commit is contained in:
parent
dec18895eb
commit
ca2d1d6975
47 changed files with 218 additions and 180 deletions
|
@ -41,12 +41,12 @@ const ExampleCurrencyFormatEditor: FieldFormatEditor<{ currency: string }> = (pr
|
|||
ExampleCurrencyFormatEditor.formatId = ExampleCurrencyFormat.id;
|
||||
|
||||
// 3. Wrap editor component in a factory. This is needed to support and encourage code-splitting.
|
||||
const ExampleCurrencyFormatEditorFactory: FieldFormatEditorFactory<{
|
||||
currency: string;
|
||||
}> = async () => ExampleCurrencyFormatEditor;
|
||||
const ExampleCurrencyFormatEditorFactory = async () => ExampleCurrencyFormatEditor;
|
||||
ExampleCurrencyFormatEditorFactory.formatId = ExampleCurrencyFormatEditor.formatId;
|
||||
|
||||
export function registerExampleFormatEditor(indexPatternFieldEditor: IndexPatternFieldEditorSetup) {
|
||||
// 4. Register a field editor. This should happen in setup plugin lifecycle phase.
|
||||
indexPatternFieldEditor.fieldFormatEditors.register(ExampleCurrencyFormatEditorFactory);
|
||||
indexPatternFieldEditor.fieldFormatEditors.register(
|
||||
ExampleCurrencyFormatEditorFactory as FieldFormatEditorFactory
|
||||
);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue