@openshift-console/dynamic-plugin-sdk
Version:
Provides core APIs, types and utilities used by dynamic plugins at runtime.
12 lines (11 loc) • 496 B
TypeScript
import { Extension, ExtensionDeclaration, CodeRef } from '../types';
export type DataSource = ExtensionDeclaration<'console.dashboards/datasource', {
contextId: string;
/** Returns a extension function that provides a custom data source object */
getDataSource: CodeRef<(dataSourceID: string) => Promise<CustomDataSource>>;
}>;
export declare const isDataSource: (e: Extension) => e is DataSource;
export type CustomDataSource = {
basePath: string;
dataSourceType: string;
};