mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Frontend: Enable TS IsolatedModules (#95586)
* chore(typescript): enable isolatedModules * chore(frontend): fix ts errors related to isolated modules
This commit is contained in:
parent
7619d9cb11
commit
2bcc46c338
@ -26,7 +26,7 @@ import {
|
|||||||
SortOrder,
|
SortOrder,
|
||||||
} from './richHistoryTypes';
|
} from './richHistoryTypes';
|
||||||
|
|
||||||
export { RichHistorySearchFilters, RichHistorySettings, SortOrder };
|
export { type RichHistorySearchFilters, type RichHistorySettings, SortOrder };
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Add queries to rich history. Save only queries within the retention period, or that are starred.
|
* Add queries to rich history. Save only queries within the retention period, or that are starred.
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
export { HistorySrv, historySrv, RevisionsModel } from './HistorySrv';
|
export { HistorySrv, historySrv, type RevisionsModel } from './HistorySrv';
|
||||||
export { VersionHistoryTable } from './VersionHistoryTable';
|
export { VersionHistoryTable } from './VersionHistoryTable';
|
||||||
export { VersionHistoryHeader } from './VersionHistoryHeader';
|
export { VersionHistoryHeader } from './VersionHistoryHeader';
|
||||||
export { VersionsHistoryButtons } from './VersionHistoryButtons';
|
export { VersionsHistoryButtons } from './VersionHistoryButtons';
|
||||||
|
@ -12,8 +12,8 @@
|
|||||||
// See the License for the specific language governing permissions and
|
// See the License for the specific language governing permissions and
|
||||||
// limitations under the License.
|
// limitations under the License.
|
||||||
|
|
||||||
export { TraceSpan, TraceResponse, Trace, TraceProcess, TraceLink, CriticalPathSection } from './trace';
|
export type { TraceSpan, TraceResponse, Trace, TraceProcess, TraceLink, CriticalPathSection } from './trace';
|
||||||
export { SpanBarOptions, SpanBarOptionsData } from '../settings/SpanBarSettings';
|
export type { SpanBarOptions, SpanBarOptionsData } from '../settings/SpanBarSettings';
|
||||||
export { default as TTraceTimeline } from './TTraceTimeline';
|
export type { default as TTraceTimeline } from './TTraceTimeline';
|
||||||
export { default as TNil } from './TNil';
|
export type { default as TNil } from './TNil';
|
||||||
export { SpanLinkFunc, SpanLinkDef } from './links';
|
export type { SpanLinkFunc, SpanLinkDef } from './links';
|
||||||
|
@ -10,7 +10,7 @@ import {
|
|||||||
VariableHide,
|
VariableHide,
|
||||||
TypedVariableModel,
|
TypedVariableModel,
|
||||||
} from '@grafana/data';
|
} from '@grafana/data';
|
||||||
export { BaseVariableModel as VariableModel } from '@grafana/data';
|
export type { BaseVariableModel as VariableModel } from '@grafana/data';
|
||||||
import { TemplateSrv } from '@grafana/runtime';
|
import { TemplateSrv } from '@grafana/runtime';
|
||||||
|
|
||||||
import { NEW_VARIABLE_ID } from './constants';
|
import { NEW_VARIABLE_ID } from './constants';
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
export {
|
export type {
|
||||||
GrafanaTemplateVariableQueryType,
|
GrafanaTemplateVariableQueryType,
|
||||||
UnknownQuery,
|
UnknownQuery,
|
||||||
AppInsightsMetricNameQuery,
|
AppInsightsMetricNameQuery,
|
||||||
|
@ -5,14 +5,14 @@ import {
|
|||||||
} from './dataquery.gen';
|
} from './dataquery.gen';
|
||||||
export {
|
export {
|
||||||
QueryEditorPropertyType,
|
QueryEditorPropertyType,
|
||||||
QueryEditorProperty,
|
type QueryEditorProperty,
|
||||||
QueryEditorPropertyExpression,
|
type QueryEditorPropertyExpression,
|
||||||
QueryEditorGroupByExpression,
|
type QueryEditorGroupByExpression,
|
||||||
QueryEditorFunctionExpression,
|
type QueryEditorFunctionExpression,
|
||||||
QueryEditorFunctionParameterExpression,
|
type QueryEditorFunctionParameterExpression,
|
||||||
QueryEditorArrayExpression,
|
type QueryEditorArrayExpression,
|
||||||
QueryEditorExpressionType,
|
QueryEditorExpressionType,
|
||||||
QueryEditorExpression,
|
type QueryEditorExpression,
|
||||||
} from './dataquery.gen';
|
} from './dataquery.gen';
|
||||||
|
|
||||||
export interface QueryEditorOperator<T extends QueryEditorOperatorValueType> extends QueryEditorOperatorBase {
|
export interface QueryEditorOperator<T extends QueryEditorOperatorValueType> extends QueryEditorOperatorBase {
|
||||||
|
@ -19,7 +19,7 @@ import {
|
|||||||
} from './dataquery.gen';
|
} from './dataquery.gen';
|
||||||
|
|
||||||
export * from './dataquery.gen';
|
export * from './dataquery.gen';
|
||||||
export { ElasticsearchDataQuery as ElasticsearchQuery } from './dataquery.gen';
|
export type { ElasticsearchDataQuery as ElasticsearchQuery } from './dataquery.gen';
|
||||||
|
|
||||||
// We want to extend the settings of the Logs query with additional properties that
|
// We want to extend the settings of the Logs query with additional properties that
|
||||||
// are not part of the schema. This is a workaround, because exporting LogsSettings
|
// are not part of the schema. This is a workaround, because exporting LogsSettings
|
||||||
|
@ -12,4 +12,4 @@
|
|||||||
// See the License for the specific language governing permissions and
|
// See the License for the specific language governing permissions and
|
||||||
// limitations under the License.
|
// limitations under the License.
|
||||||
|
|
||||||
export { TraceSpan, TraceResponse, Trace, TraceProcess, TraceLink, CriticalPathSection } from './trace';
|
export type { TraceSpan, TraceResponse, Trace, TraceProcess, TraceLink, CriticalPathSection } from './trace';
|
||||||
|
@ -33,7 +33,7 @@ export enum LokiVisualQueryOperationCategory {
|
|||||||
Formats = 'Formats',
|
Formats = 'Formats',
|
||||||
LineFilters = 'Line filters',
|
LineFilters = 'Line filters',
|
||||||
LabelFilters = 'Label filters',
|
LabelFilters = 'Label filters',
|
||||||
BinaryOps = BINARY_OPERATIONS_KEY,
|
BinaryOps = `${BINARY_OPERATIONS_KEY}`,
|
||||||
}
|
}
|
||||||
|
|
||||||
export enum LokiOperationId {
|
export enum LokiOperationId {
|
||||||
|
@ -28,12 +28,12 @@ export const defaultOptions: Partial<Options> = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
export {
|
export {
|
||||||
Options,
|
type Options,
|
||||||
CandlestickColors,
|
type CandlestickColors,
|
||||||
defaultCandlestickColors,
|
defaultCandlestickColors,
|
||||||
CandleStyle,
|
CandleStyle,
|
||||||
ColorStrategy,
|
ColorStrategy,
|
||||||
VizDisplayMode,
|
VizDisplayMode,
|
||||||
CandlestickFieldMap,
|
type CandlestickFieldMap,
|
||||||
FieldConfig,
|
type FieldConfig,
|
||||||
};
|
};
|
||||||
|
@ -53,4 +53,10 @@ export interface MapLayerState<TConfig = unknown> extends LayerElement {
|
|||||||
mouseEvents: Subject<FeatureLike | undefined>;
|
mouseEvents: Subject<FeatureLike | undefined>;
|
||||||
}
|
}
|
||||||
|
|
||||||
export { Options, MapViewConfig, TooltipOptions, TooltipMode, defaultMapViewConfig } from './panelcfg.gen';
|
export {
|
||||||
|
type Options,
|
||||||
|
type MapViewConfig,
|
||||||
|
type TooltipOptions,
|
||||||
|
TooltipMode,
|
||||||
|
defaultMapViewConfig,
|
||||||
|
} from './panelcfg.gen';
|
||||||
|
@ -2,7 +2,7 @@ import React, { ReactNode } from 'react';
|
|||||||
|
|
||||||
import { DataFrame } from '@grafana/data';
|
import { DataFrame } from '@grafana/data';
|
||||||
|
|
||||||
export { Options } from './panelcfg.gen';
|
export type { Options } from './panelcfg.gen';
|
||||||
|
|
||||||
type onClickFilterLabelType = (key: string, value: string, frame?: DataFrame) => void;
|
type onClickFilterLabelType = (key: string, value: string, frame?: DataFrame) => void;
|
||||||
type onClickFilterOutLabelType = (key: string, value: string, frame?: DataFrame) => void;
|
type onClickFilterOutLabelType = (key: string, value: string, frame?: DataFrame) => void;
|
||||||
|
@ -2,7 +2,7 @@ import { SimulationNodeDatum, SimulationLinkDatum } from 'd3-force';
|
|||||||
|
|
||||||
import { DataFrame, Field, IconName } from '@grafana/data';
|
import { DataFrame, Field, IconName } from '@grafana/data';
|
||||||
|
|
||||||
export { Options as NodeGraphOptions, ArcOption } from './panelcfg.gen';
|
export type { Options as NodeGraphOptions, ArcOption } from './panelcfg.gen';
|
||||||
|
|
||||||
export type NodeDatum = SimulationNodeDatum & {
|
export type NodeDatum = SimulationNodeDatum & {
|
||||||
id: string;
|
id: string;
|
||||||
|
@ -9,6 +9,7 @@
|
|||||||
"resolveJsonModule": true,
|
"resolveJsonModule": true,
|
||||||
"useUnknownInCatchVariables": true,
|
"useUnknownInCatchVariables": true,
|
||||||
"incremental": true,
|
"incremental": true,
|
||||||
|
"isolatedModules": true,
|
||||||
"tsBuildInfoFile": "./tsconfig.tsbuildinfo",
|
"tsBuildInfoFile": "./tsconfig.tsbuildinfo",
|
||||||
"paths": {
|
"paths": {
|
||||||
"@grafana/schema/dist/esm/*": ["../packages/grafana-schema/src/*"]
|
"@grafana/schema/dist/esm/*": ["../packages/grafana-schema/src/*"]
|
||||||
|
Loading…
Reference in New Issue
Block a user