From 5e7cbf3f30175de5c1d5fc9a1d8a97d5e24cf734 Mon Sep 17 00:00:00 2001 From: borisstgermain Date: Wed, 27 Sep 2017 12:54:53 +0300 Subject: [PATCH] Switch Scopes form PropTypes to Flow Props (#4180) --- src/components/SecondaryPanes/Scopes.js | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/src/components/SecondaryPanes/Scopes.js b/src/components/SecondaryPanes/Scopes.js index 8c4410d765..b24ba5bec1 100644 --- a/src/components/SecondaryPanes/Scopes.js +++ b/src/components/SecondaryPanes/Scopes.js @@ -1,5 +1,5 @@ // @flow -import React, { PropTypes, PureComponent } from "react"; +import React, { PureComponent } from "react"; import { bindActionCreators } from "redux"; import { connect } from "react-redux"; import actions from "../../actions"; @@ -12,15 +12,25 @@ import { import { getScopes } from "../../utils/scopes"; import { ObjectInspector } from "devtools-reps"; +import type { Pause, LoadedObject } from "debugger-html"; import "./Scopes.css"; +type Props = { + pauseInfo: Pause, + loadedObjects: LoadedObject[], + loadObjectProperties: Object => void, + selectedFrame: Object, + frameScopes: Object +}; + class Scopes extends PureComponent { + props: Props; state: { scopes: any }; - constructor(props, ...args) { + constructor(props: Props, ...args) { const { pauseInfo, selectedFrame, frameScopes } = props; super(props, ...args); @@ -80,14 +90,6 @@ class Scopes extends PureComponent { } } -Scopes.propTypes = { - pauseInfo: PropTypes.object, - loadedObjects: PropTypes.object, - loadObjectProperties: PropTypes.func, - selectedFrame: PropTypes.object, - frameScopes: PropTypes.object -}; - export default connect( state => { const selectedFrame = getSelectedFrame(state);