mirror of
https://github.com/apache/superset.git
synced 2026-05-12 19:35:17 +00:00
fix(types): make AdhocFilter and AdhocMetric interfaces more flexible
Allow additional properties via index signature to support test fixtures and various usage patterns across the codebase. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -30,8 +30,8 @@ const CUSTOM_OPERATIONS = [...CUSTOM_OPERATORS].map(
|
||||
|
||||
interface AdhocFilterInput {
|
||||
expressionType?: string;
|
||||
subject?: string;
|
||||
operator?: string;
|
||||
subject?: string | null;
|
||||
operator?: string | null;
|
||||
operatorId?: string;
|
||||
comparator?: unknown;
|
||||
clause?: string;
|
||||
@@ -42,6 +42,8 @@ interface AdhocFilterInput {
|
||||
deck_slices?: unknown;
|
||||
layerFilterScope?: unknown;
|
||||
filterOptionName?: string;
|
||||
// Allow additional properties for flexibility
|
||||
[key: string]: unknown;
|
||||
}
|
||||
|
||||
export default class AdhocFilter {
|
||||
|
||||
@@ -40,6 +40,12 @@ interface AdhocMetricInput {
|
||||
hasCustomLabel?: boolean;
|
||||
label?: string;
|
||||
optionName?: string;
|
||||
// Additional properties that may be passed in
|
||||
metric_name?: string;
|
||||
expression?: string;
|
||||
error_text?: string;
|
||||
uuid?: string;
|
||||
[key: string]: unknown;
|
||||
}
|
||||
|
||||
function inferSqlExpressionColumn(adhocMetric: AdhocMetricInput): string | null {
|
||||
|
||||
Reference in New Issue
Block a user