You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by "michael-s-molina (via GitHub)" <gi...@apache.org> on 2023/09/12 18:42:02 UTC

[GitHub] [superset] michael-s-molina commented on a diff in pull request #25228: chore(sqllab): Typescript for SqlEditor component

michael-s-molina commented on code in PR #25228:
URL: https://github.com/apache/superset/pull/25228#discussion_r1323412336


##########
superset-frontend/src/SqlLab/components/AceEditorWrapper/index.tsx:
##########
@@ -30,7 +31,7 @@ type HotKey = {
   key: string;
   descr: string;
   name: string;
-  func: () => void;
+  func: (arg0: IAceEditor) => void;

Review Comment:
   ```suggestion
     func: (aceEditor: IAceEditor) => void;
   ```



##########
superset-frontend/src/SqlLab/components/SaveQuery/index.tsx:
##########
@@ -38,11 +39,11 @@ interface SaveQueryProps {
   columns: ISaveableDatasource['columns'];
   onSave: (arg0: QueryPayload, id: string) => void;
   onUpdate: (arg0: QueryPayload, id: string) => void;
-  saveQueryWarning: string | null;
-  database: Record<string, any>;
+  saveQueryWarning?: string | null;

Review Comment:
   Can this be `undefined` or `string | null` is sufficient?



##########
superset-frontend/src/SqlLab/components/SqlEditorLeftBar/index.tsx:
##########
@@ -55,15 +55,15 @@ import {
 } from 'src/utils/localStorageHelpers';
 import TableElement from '../TableElement';
 
-interface ExtendedTable extends Table {
+export interface ExtendedTable extends Table {
   expanded: boolean;
 }
 
 interface SqlEditorLeftBarProps {
   queryEditorId: string;
   height?: number;
   tables?: ExtendedTable[];
-  database: DatabaseObject;
+  database: DatabaseObject | undefined;

Review Comment:
   ```suggestion
     database?: DatabaseObject;
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org