forked from apache/superset
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: separate transform function types into a new file (apache#169)
* refactor: separate transform function types into a new file * fix: import
- Loading branch information
1 parent
09f9405
commit bbf13fd
Showing
8 changed files
with
26 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...rset-ui/packages/superset-ui-chart/src/registries/ChartTransformPropsRegistrySingleton.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 5 additions & 0 deletions
5
...t-frontend/temporary_superset_ui/superset-ui/packages/superset-ui-chart/src/types/Base.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
export type HandlerFunction = (...args: any[]) => void; | ||
|
||
export interface PlainObject { | ||
[key: string]: any; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
15 changes: 15 additions & 0 deletions
15
...mporary_superset_ui/superset-ui/packages/superset-ui-chart/src/types/TransformFunction.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import { ChartFormData } from './ChartFormData'; | ||
import ChartProps from '../models/ChartProps'; | ||
import { QueryContext } from './Query'; | ||
|
||
export interface PlainProps { | ||
[key: string]: any; | ||
} | ||
|
||
type TransformFunction<Input = PlainProps, Output = PlainProps> = (x: Input) => Output; | ||
|
||
export type PreTransformProps = TransformFunction<ChartProps, ChartProps>; | ||
export type TransformProps = TransformFunction<ChartProps>; | ||
export type PostTransformProps = TransformFunction; | ||
|
||
export type BuildQueryFunction<T extends ChartFormData> = (formData: T) => QueryContext; |