chore(sqllab): Typescript for SqlEditor component (#25228)

This commit is contained in:
JUST.in DO IT
2023-10-05 12:33:01 -04:00
committed by GitHub
parent c81c60c91f
commit 34f99708d4
15 changed files with 216 additions and 158 deletions

View File

@@ -17,6 +17,7 @@
* under the License.
*/
import React, { useState, useEffect, useMemo } from 'react';
import type { DatabaseObject } from 'src/features/databases/types';
import { Row, Col } from 'src/components';
import { Input, TextArea } from 'src/components/Input';
import { t, styled } from '@superset-ui/core';
@@ -39,10 +40,10 @@ interface SaveQueryProps {
onSave: (arg0: QueryPayload, id: string) => void;
onUpdate: (arg0: QueryPayload, id: string) => void;
saveQueryWarning: string | null;
database: Record<string, any>;
database: Partial<DatabaseObject> | undefined;
}
type QueryPayload = {
export type QueryPayload = {
name: string;
description?: string;
id?: string;
@@ -65,7 +66,7 @@ const SaveQuery = ({
queryEditorId,
onSave = () => {},
onUpdate,
saveQueryWarning = null,
saveQueryWarning,
database,
columns,
}: SaveQueryProps) => {