kristw commented on a change in pull request #10317:
URL:
https://github.com/apache/incubator-superset/pull/10317#discussion_r455201101
##########
File path: superset-frontend/src/welcome/DashboardTable.tsx
##########
@@ -17,35 +17,45 @@
* under the License.
*/
import React from 'react';
-import PropTypes from 'prop-types';
import { t } from '@superset-ui/translation';
import { SupersetClient } from '@superset-ui/connection';
import moment from 'moment';
import { debounce } from 'lodash';
import ListView from 'src/components/ListView/ListView';
import withToasts from 'src/messageToasts/enhancers/withToasts';
+import { Dashboard } from 'src/types/bootstrapTypes';
+import { FetchDataConfig } from 'src/components/ListView/types';
const PAGE_SIZE = 25;
-class DashboardTable extends React.PureComponent {
- static propTypes = {
- addDangerToast: PropTypes.func.isRequired,
- search: PropTypes.string,
- };
+interface DashboardTableProps {
Review comment:
The point is not the code won't work. Both works.
Using `type` has convenience when hovering and you can see its content
immediately because `type` is just an alias while `interface` encapsulates its
content so you have to go to the definition to see its fields.
Oftentimes you want to see what can be in the `Props`.
when using type

when using interface

----------------------------------------------------------------
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]