Skip to content

Commit

Permalink
Made fixes, based on nits.
Browse files Browse the repository at this point in the history
  • Loading branch information
Kuznietsov committed Jul 22, 2021
1 parent bc6486f commit 2cc4a85
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 9 deletions.
6 changes: 3 additions & 3 deletions src/plugins/expression_repeat_image/public/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@
* Side Public License, v 1.
*/

import { ExpressionMetricPlugin } from './plugin';
import { ExpressionRepeatImagePlugin } from './plugin';

export type { ExpressionMetricPluginSetup, ExpressionMetricPluginStart } from './plugin';
export type { ExpressionRepeatImagePluginSetup, ExpressionRepeatImagePluginStart } from './plugin';

export function plugin() {
return new ExpressionMetricPlugin();
return new ExpressionRepeatImagePlugin();
}

export * from './expression_renderers';
19 changes: 13 additions & 6 deletions src/plugins/expression_repeat_image/public/plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

import { CoreSetup, CoreStart, Plugin } from '../../../core/public';
import { ExpressionsStart, ExpressionsSetup } from '../../expressions/public';
import { repeatImageFunction } from '../common/expression_functions';
import { repeatImageRenderer } from './expression_renderers';

interface SetupDeps {
Expand All @@ -18,17 +19,23 @@ interface StartDeps {
expression: ExpressionsStart;
}

export type ExpressionMetricPluginSetup = void;
export type ExpressionMetricPluginStart = void;
export type ExpressionRepeatImagePluginSetup = void;
export type ExpressionRepeatImagePluginStart = void;

export class ExpressionMetricPlugin
export class ExpressionRepeatImagePlugin
implements
Plugin<ExpressionMetricPluginSetup, ExpressionMetricPluginStart, SetupDeps, StartDeps> {
public setup(core: CoreSetup, { expressions }: SetupDeps): ExpressionMetricPluginSetup {
Plugin<
ExpressionRepeatImagePluginSetup,
ExpressionRepeatImagePluginStart,
SetupDeps,
StartDeps
> {
public setup(core: CoreSetup, { expressions }: SetupDeps): ExpressionRepeatImagePluginSetup {
expressions.registerFunction(repeatImageFunction);
expressions.registerRenderer(repeatImageRenderer);
}

public start(core: CoreStart): ExpressionMetricPluginStart {}
public start(core: CoreStart): ExpressionRepeatImagePluginStart {}

public stop() {}
}

0 comments on commit 2cc4a85

Please sign in to comment.