asif-ir commented on a change in pull request #9291: [SIP-36] Migrate 
RunQueryActionButton.jsx to RunQueryActionButton.tsx…
URL: 
https://github.com/apache/incubator-superset/pull/9291#discussion_r391814478
 
 

 ##########
 File path: superset-frontend/src/SqlLab/components/RunQueryActionButton.tsx
 ##########
 @@ -17,53 +17,57 @@
  * under the License.
  */
 import React from 'react';
-import PropTypes from 'prop-types';
 import { t } from '@superset-ui/translation';
 
 import Button from '../../components/Button';
 
-const propTypes = {
-  allowAsync: PropTypes.bool.isRequired,
-  dbId: PropTypes.number,
-  queryState: PropTypes.string,
-  runQuery: PropTypes.func.isRequired,
-  selectedText: PropTypes.string,
-  stopQuery: PropTypes.func.isRequired,
-  sql: PropTypes.string.isRequired,
-};
-const defaultProps = {
-  allowAsync: false,
-  sql: '',
-};
+interface Props {
+  allowAsync: boolean;
+  dbId: number | null;
+  queryState: string;
 
 Review comment:
   Didn't change this one since queryState is being using in _indexOf_ few 
lines below which gets type-angry if you feed *undefined* to it.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to