Skip to content

Commit

Permalink
Add ts-ignore for grafana/data APIs
Browse files Browse the repository at this point in the history
  • Loading branch information
aocenas committed Aug 19, 2022
1 parent abf356e commit e26a2d4
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions grafana/flamegraph/src/module.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import React from 'react';
// @ts-ignore
import { ExplorePanelProps, PanelPlugin, PanelProps } from '@grafana/data';
import FlameGraphContainer from './components/FlameGraphContainer';

Expand All @@ -10,4 +11,9 @@ export const FlameExploreGraphPanel: React.FunctionComponent<ExplorePanelProps>
return <FlameGraphContainer data={props.data[0]} />;
};

// We use ts-ignore here because setExplorePanel and ExplorePanelProps are part of a draft PR that isn't yet merged.
// We could solve this by linking but that has quite a bit of issues with regard of resolving dependencies downstream
// in grafana/data and also needs some custom modification in grafana repo so for now this seems to be easier as the
// there is not that much to the API.
// @ts-ignore
export const plugin = new PanelPlugin(FlameGraphPanel).setExplorePanel(FlameExploreGraphPanel, ['profile']);

0 comments on commit e26a2d4

Please sign in to comment.