chore(deps-dev): bump oxlint from 1.48.0 to 1.49.0 in /superset-frontend (#38115)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: hainenber <dotronghai96@gmail.com>
This commit is contained in:
dependabot[bot]
2026-02-20 14:13:37 -08:00
committed by GitHub
parent 44d6b6a513
commit cff854b06e
14 changed files with 248 additions and 245 deletions

View File

@@ -87,33 +87,6 @@ function inferSqlExpressionAggregate(
return null;
}
/**
* Adapter function to create an AdhocMetric instance from a core AdhocMetric type.
* This bridges the type gap between @superset-ui/core's AdhocMetric and the local class.
*/
export function fromCoreAdhocMetric(metric: CoreAdhocMetric): AdhocMetric {
return new AdhocMetric(metric as AdhocMetricInput);
}
/**
* Type guard to check if an object can be used to construct an AdhocMetric.
* Returns true for plain objects that have metric-like properties.
*/
export function isDictionaryForAdhocMetric(
value: unknown,
): value is AdhocMetricInput {
return (
typeof value === 'object' &&
value !== null &&
!(value instanceof AdhocMetric) &&
('expressionType' in value ||
'column' in value ||
'aggregate' in value ||
'sqlExpression' in value ||
'metric_name' in value)
);
}
export default class AdhocMetric {
expressionType: string;
column?: ColumnType | null;
@@ -224,3 +197,30 @@ export default class AdhocMetric {
return inferSqlExpressionColumn(this as unknown as AdhocMetricInput);
}
}
/**
* Type guard to check if an object can be used to construct an AdhocMetric.
* Returns true for plain objects that have metric-like properties.
*/
export function isDictionaryForAdhocMetric(
value: unknown,
): value is AdhocMetricInput {
return (
typeof value === 'object' &&
value !== null &&
!(value instanceof AdhocMetric) &&
('expressionType' in value ||
'column' in value ||
'aggregate' in value ||
'sqlExpression' in value ||
'metric_name' in value)
);
}
/**
* Adapter function to create an AdhocMetric instance from a core AdhocMetric type.
* This bridges the type gap between @superset-ui/core's AdhocMetric and the local class.
*/
export function fromCoreAdhocMetric(metric: CoreAdhocMetric): AdhocMetric {
return new AdhocMetric(metric as AdhocMetricInput);
}