Advertisement
Guest User

Untitled

a guest
Aug 14th, 2019
113
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 28.11 KB | None | 0 0
  1. Error ┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈ src/plugins/network/ManageMockResponsePanel.js:22:9
  2.  
  3. Cannot import the type Route as a value. Use import type instead.
  4.  
  5. 19│ ContextMenu,
  6. 20│ } from 'flipper';
  7. 21│
  8. 22│ import {Route} from './types';
  9. 23│
  10. 24│ import {MockResponseDetails} from './MockResponseDetails';
  11. 25│ import type {RequestId} from './types';
  12.  
  13.  
  14. Error ┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈ src/plugins/network/ManageMockResponsePanel.js:109:13
  15.  
  16. Cannot assign object literal to this.state because array literal [1] has an arity of 1 but tuple type [2] has an arity
  17. of 0 in property selectedIds.
  18.  
  19. [2] 33│ selectedIds: [],
  20. :
  21. 103│
  22. 104│ constructor(props: Props) {
  23. 105│ super(props);
  24. 106│ this.state = {
  25. 107│ selectedIds:
  26. 108│ this.props.routes !== undefined && this.props.routes.length > 0
  27. [1] 109│ ? [0]
  28. 110│ : [],
  29. 111│ };
  30. 112│ }
  31. 113│
  32. 114│ deleteRoute = () => {
  33.  
  34.  
  35. Error ┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈ src/plugins/network/ManageMockResponsePanel.js:116:51
  36.  
  37. Cannot get selectedIds[0] because tuple type [1] only has 0 elements, so index 0 is out of bounds.
  38.  
  39. [1] 33│ selectedIds: [],
  40. :
  41. 113│
  42. 114│ deleteRoute = () => {
  43. 115│ const {selectedIds} = this.state;
  44. 116│ const selectedId = selectedIds.length === 1 ? selectedIds[0] : null;
  45. 117│ const routes = this.props.routes;
  46. 118│ routes.splice(selectedId, 1);
  47. 119│
  48.  
  49.  
  50. Error ┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈ src/plugins/network/ManageMockResponsePanel.js:118:19
  51.  
  52. Cannot call routes.splice with selectedId bound to start because:
  53. • undefined (out of bounds tuple access) [1] is incompatible with number [2].
  54. • null [3] is incompatible with number [2].
  55.  
  56. src/plugins/network/ManageMockResponsePanel.js
  57. 115│ const {selectedIds} = this.state;
  58. [1][3] 116│ const selectedId = selectedIds.length === 1 ? selectedIds[0] : null;
  59. 117│ const routes = this.props.routes;
  60. 118│ routes.splice(selectedId, 1);
  61. 119│
  62. 120│ this.checkDuplicate(routes);
  63. 121│
  64.  
  65. /private/tmp/flow/flowlib_1c80054e/core.js
  66. [2] 291│ splice(start: number, deleteCount?: number, ...items: Array<T>): Array<T>;
  67.  
  68.  
  69. Error ┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈ src/plugins/network/ManageMockResponsePanel.js:181:25
  70.  
  71. Cannot call this.checkDuplicate with newRoutes bound to routes because:
  72. • property data is missing in object literal [1] but exists in Route [2] in array element.
  73. • property headers is missing in object literal [1] but exists in Route [2] in array element.
  74. • property isDuplicate is missing in object literal [1] but exists in Route [2] in array element.
  75.  
  76. [2] 162│ checkDuplicate = (routes: Route[]) => {
  77. :
  78. [1] 175│ const route = {
  79. 176│ requestUrl: '/',
  80. 177│ method: 'GET',
  81. 178│ };
  82. 179│ const newRoutes = [...this.props.routes, route];
  83. 180│
  84. 181│ this.checkDuplicate(newRoutes);
  85. 182│
  86. 183│ this.props.handleRoutesChange(newRoutes);
  87. 184│
  88.  
  89.  
  90. Error ┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈ src/plugins/network/ManageMockResponsePanel.js:183:35
  91.  
  92. Cannot call this.props.handleRoutesChange with newRoutes bound to routes because:
  93. • property data is missing in object literal [1] but exists in Route [2] in array element.
  94. • property headers is missing in object literal [1] but exists in Route [2] in array element.
  95. • property isDuplicate is missing in object literal [1] but exists in Route [2] in array element.
  96.  
  97. [2] 29│ handleRoutesChange: (routes: Route[]) => void,
  98. :
  99. [1] 175│ const route = {
  100. 176│ requestUrl: '/',
  101. 177│ method: 'GET',
  102. 178│ };
  103. 179│ const newRoutes = [...this.props.routes, route];
  104. 180│
  105. 181│ this.checkDuplicate(newRoutes);
  106. 182│
  107. 183│ this.props.handleRoutesChange(newRoutes);
  108. 184│
  109. 185│ this.setState({
  110. 186│ selectedIds: [newRoutes.length - 1],
  111.  
  112.  
  113. Error ┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈ src/plugins/network/ManageMockResponsePanel.js:186:20
  114.  
  115. Cannot call this.setState with object literal bound to partialState because array literal [1] has an arity of 1 but
  116. tuple type [2] has an arity of 0.
  117.  
  118. [2] 33│ selectedIds: [],
  119. :
  120. 182│
  121. 183│ this.props.handleRoutesChange(newRoutes);
  122. 184│
  123. 185│ this.setState({
  124. [1] 186│ selectedIds: [newRoutes.length - 1],
  125. 187│ });
  126. 188│ };
  127. 189│
  128. 190│ onRowHighlighted = (selectedIds: Array<RequestId>) =>
  129.  
  130.  
  131. Error ┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈ src/plugins/network/ManageMockResponsePanel.js:191:19
  132.  
  133. Cannot call this.setState with object literal bound to partialState because array type [1] has an unknown number of
  134. elements, so is incompatible with tuple type [2] in property selectedIds.
  135.  
  136. [2] 33│ selectedIds: [],
  137. :
  138. 188│ };
  139. 189│
  140. [1] 190│ onRowHighlighted = (selectedIds: Array<RequestId>) =>
  141. 191│ this.setState({selectedIds: selectedIds});
  142. 192│
  143. 193│ handleRouteChange = (selectedId: RequestId, route: Route) => {
  144. 194│ const routes = this.props.routes;
  145.  
  146.  
  147. Error ┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈ src/plugins/network/ManageMockResponsePanel.js:197:5
  148.  
  149. Cannot assign route to routes[selectedId] because string [1] is not an array index.
  150.  
  151. [1] 193│ handleRouteChange = (selectedId: RequestId, route: Route) => {
  152. 194│ const routes = this.props.routes;
  153. 195│
  154. 196│ // Set route
  155. 197│ routes[selectedId] = route;
  156. 198│
  157. 199│ // Check duplicate
  158. 200│ this.checkDuplicate(routes);
  159.  
  160.  
  161. Error ┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈ src/plugins/network/ManageMockResponsePanel.js:203:7
  162.  
  163. Cannot call this.setState with object literal bound to partialState because:
  164. • Either property routes is missing in State [1] but exists in object literal [2].
  165. • Or a call signature declaring the expected parameter / return type is missing in object literal [2] but exists in
  166. function type [3].
  167.  
  168. src/plugins/network/ManageMockResponsePanel.js
  169. [1] 87│ export class ManageMockResponsePanel extends Component<Props, State> {
  170. :
  171. 200│ this.checkDuplicate(routes);
  172. 201│
  173. 202│ this.setState(
  174. [2] 203│ {
  175. 204│ routes: routes,
  176. 205│ },
  177. 206│ () => {
  178. 207│ this.props.handleRoutesChange(routes);
  179. 208│ },
  180.  
  181. /private/tmp/flow/flowlib_1c80054e/react.js
  182. [3] 35│ partialState: ?$Shape<State> | ((State, Props) => ?$Shape<State>),
  183.  
  184.  
  185. Error ┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈ src/plugins/network/ManageMockResponsePanel.js:215:51
  186.  
  187. Cannot get selectedIds[0] because tuple type [1] only has 0 elements, so index 0 is out of bounds.
  188.  
  189. [1] 33│ selectedIds: [],
  190. :
  191. 212│ renderSidebar = () => {
  192. 213│ const {selectedIds} = this.state;
  193. 214│ const {routes} = this.props;
  194. 215│ const selectedId = selectedIds.length === 1 ? selectedIds[0] : null;
  195. 216│
  196. 217│ return selectedId != null ? (
  197. 218│ <Panel
  198.  
  199.  
  200. Error ┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈ src/plugins/network/ManageMockResponsePanel.js:227:30
  201.  
  202. Cannot create MockResponseDetails element because undefined [1] is incompatible with object type [2] in the return value
  203. of property handleRouteChange.
  204.  
  205. src/plugins/network/ManageMockResponsePanel.js
  206. [1] 193│ handleRouteChange = (selectedId: RequestId, route: Route) => {
  207. :
  208. 220│ collapsable={false}
  209. 221│ floating={false}
  210. 222│ heading={'Route Info'}>
  211. 223│ <MockResponseDetails
  212. 224│ key={selectedId}
  213. 225│ id={selectedId}
  214. 226│ route={routes[selectedId]}
  215. 227│ handleRouteChange={this.handleRouteChange}
  216. 228│ />
  217. 229│ </Panel>
  218. 230│ ) : null;
  219. 231│ };
  220.  
  221. src/plugins/network/MockResponseDetails.js
  222. [2] 31│ handleRouteChange: (selectedId: RequestId, route: Route) => {},
  223.  
  224.  
  225. Error ┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈ src/plugins/network/MockResponseDetails.js:151:11
  226.  
  227. Cannot extend Component [1] with MockResponseDetails because property selectedHeaderIds is missing in object literal [2]
  228. but exists in State [3] in property state.
  229.  
  230. 147│ flex: 1,
  231. 148│ });
  232. 149│
  233. [1][3] 150│ export class MockResponseDetails extends Component<Props, State> {
  234. [2] 151│ state = {
  235. 152│ activeTab: 'data',
  236. 153│ };
  237. 154│
  238. 155│ updateRouteChange = (route: Route) => {
  239. 156│ this.props.handleRouteChange(this.props.id, route);
  240. 157│ };
  241. 158│
  242. 159│ handleMethodSelectChange = (text: string) => {
  243. 160│ const route = this.props.route;
  244. 161│ route.method = text;
  245. 162│ this.updateRouteChange(route);
  246. 163│ };
  247. 164│
  248. :
  249. 356│ <AddHeaderButton onClick={this.addRow}>
  250. 357│ <Glyph
  251. 358│ name="plus-circle"
  252. 359│ size={16}
  253. 360│ variant="outline"
  254. 361│ color={colors.blackAlpha30}
  255. 362│ />
  256. 363│ &nbsp;Add Header
  257. 364│ </AddHeaderButton>
  258. 365│ </Tab>
  259. 366│ </Tabs>
  260. 367│ </Container>
  261. 368│ );
  262. 369│ }
  263. 370│ }
  264. 371│
  265.  
  266.  
  267. Error ┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈ src/plugins/network/MockResponseDetails.js:165:26
  268.  
  269. Missing type annotation for event.
  270.  
  271. 162│ this.updateRouteChange(route);
  272. 163│ };
  273. 164│
  274. 165│ handleURLInputChange = event => {
  275. 166│ const route = this.props.route;
  276. 167│ route.requestUrl = event.target.value;
  277. 168│ this.updateRouteChange(route);
  278.  
  279.  
  280. Error ┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈ src/plugins/network/MockResponseDetails.js:171:30
  281.  
  282. Missing type annotation for event.
  283.  
  284. 168│ this.updateRouteChange(route);
  285. 169│ };
  286. 170│
  287. 171│ handleDataTextAreaChange = event => {
  288. 172│ const route = this.props.route;
  289. 173│ route.data = event.target.value;
  290. 174│ this.updateRouteChange(route);
  291.  
  292.  
  293. Error ┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈ src/plugins/network/MockResponseDetails.js:177:28
  294.  
  295. Missing type annotation for event.
  296.  
  297. 174│ this.updateRouteChange(route);
  298. 175│ };
  299. 176│
  300. 177│ handleHeaderNameChange = event => {
  301. 178│ const route = this.props.route;
  302. 179│ const {selectedHeaderIds} = this.state;
  303. 180│ const selectedId =
  304.  
  305.  
  306. Error ┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈ src/plugins/network/MockResponseDetails.js:179:12
  307.  
  308. Property selectedHeaderIds is missing in object literal [1].
  309.  
  310. [1] 151│ state = {
  311. 152│ activeTab: 'data',
  312. 153│ };
  313. :
  314. 176│
  315. 177│ handleHeaderNameChange = event => {
  316. 178│ const route = this.props.route;
  317. 179│ const {selectedHeaderIds} = this.state;
  318. 180│ const selectedId =
  319. 181│ selectedHeaderIds.length === 1 ? selectedHeaderIds[0] : null;
  320. 182│ route.headers[selectedId].key = event.target.value;
  321.  
  322.  
  323. Error ┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈ src/plugins/network/MockResponseDetails.js:181:40
  324.  
  325. Cannot get selectedHeaderIds[0] because tuple type [1] only has 0 elements, so index 0 is out of bounds.
  326.  
  327. [1] 36│ selectedHeaderIds: [],
  328. :
  329. 178│ const route = this.props.route;
  330. 179│ const {selectedHeaderIds} = this.state;
  331. 180│ const selectedId =
  332. 181│ selectedHeaderIds.length === 1 ? selectedHeaderIds[0] : null;
  333. 182│ route.headers[selectedId].key = event.target.value;
  334. 183│ this.updateRouteChange(route);
  335. 184│ };
  336.  
  337.  
  338. Error ┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈ src/plugins/network/MockResponseDetails.js:182:5
  339.  
  340. Cannot get route.headers[selectedId] because:
  341. • undefined (out of bounds tuple access) [1] is not an array index.
  342. • null [2] is not an array index.
  343.  
  344. 179│ const {selectedHeaderIds} = this.state;
  345. 180│ const selectedId =
  346. [1][2] 181│ selectedHeaderIds.length === 1 ? selectedHeaderIds[0] : null;
  347. 182│ route.headers[selectedId].key = event.target.value;
  348. 183│ this.updateRouteChange(route);
  349. 184│ };
  350. 185│
  351.  
  352.  
  353. Error ┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈ src/plugins/network/MockResponseDetails.js:186:29
  354.  
  355. Missing type annotation for event.
  356.  
  357. 183│ this.updateRouteChange(route);
  358. 184│ };
  359. 185│
  360. 186│ handleHeaderValueChange = event => {
  361. 187│ const route = this.props.route;
  362. 188│ const {selectedHeaderIds} = this.state;
  363. 189│ const selectedId =
  364.  
  365.  
  366. Error ┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈ src/plugins/network/MockResponseDetails.js:188:12
  367.  
  368. Property selectedHeaderIds is missing in object literal [1].
  369.  
  370. [1] 151│ state = {
  371. 152│ activeTab: 'data',
  372. 153│ };
  373. :
  374. 185│
  375. 186│ handleHeaderValueChange = event => {
  376. 187│ const route = this.props.route;
  377. 188│ const {selectedHeaderIds} = this.state;
  378. 189│ const selectedId =
  379. 190│ selectedHeaderIds.length === 1 ? selectedHeaderIds[0] : null;
  380. 191│ route.headers[selectedId].value = event.target.value;
  381.  
  382.  
  383. Error ┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈ src/plugins/network/MockResponseDetails.js:190:40
  384.  
  385. Cannot get selectedHeaderIds[0] because tuple type [1] only has 0 elements, so index 0 is out of bounds.
  386.  
  387. [1] 36│ selectedHeaderIds: [],
  388. :
  389. 187│ const route = this.props.route;
  390. 188│ const {selectedHeaderIds} = this.state;
  391. 189│ const selectedId =
  392. 190│ selectedHeaderIds.length === 1 ? selectedHeaderIds[0] : null;
  393. 191│ route.headers[selectedId].value = event.target.value;
  394. 192│ this.updateRouteChange(route);
  395. 193│ };
  396.  
  397.  
  398. Error ┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈ src/plugins/network/MockResponseDetails.js:191:5
  399.  
  400. Cannot get route.headers[selectedId] because:
  401. • undefined (out of bounds tuple access) [1] is not an array index.
  402. • null [2] is not an array index.
  403.  
  404. 188│ const {selectedHeaderIds} = this.state;
  405. 189│ const selectedId =
  406. [1][2] 190│ selectedHeaderIds.length === 1 ? selectedHeaderIds[0] : null;
  407. 191│ route.headers[selectedId].value = event.target.value;
  408. 192│ this.updateRouteChange(route);
  409. 193│ };
  410. 194│
  411.  
  412.  
  413. Error ┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈ src/plugins/network/MockResponseDetails.js:196:19
  414.  
  415. Cannot call this.setState with object literal bound to partialState because array type [1] has an unknown number of
  416. elements, so is incompatible with tuple type [2] in property selectedHeaderIds.
  417.  
  418. [2] 36│ selectedHeaderIds: [],
  419. :
  420. 193│ };
  421. 194│
  422. [1] 195│ onRowHighlighted = (selectedIds: Array<RequestId>) =>
  423. 196│ this.setState({selectedHeaderIds: selectedIds});
  424. 197│
  425. 198│ onActive = (key: ?string) => {
  426. 199│ this.setState({
  427.  
  428.  
  429. Error ┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈ src/plugins/network/MockResponseDetails.js:199:19
  430.  
  431. Cannot call this.setState with object literal bound to partialState because null or undefined [1] is incompatible with
  432. string [2] in property activeTab.
  433.  
  434. [2] 35│ activeTab: string,
  435. :
  436. 196│ this.setState({selectedHeaderIds: selectedIds});
  437. 197│
  438. [1] 198│ onActive = (key: ?string) => {
  439. 199│ this.setState({
  440. 200│ activeTab: key,
  441. 201│ });
  442. 202│ };
  443. 203│
  444. 204│ buildRows = () => {
  445.  
  446.  
  447. Error ┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈ src/plugins/network/MockResponseDetails.js:217:12
  448.  
  449. Property selectedHeaderIds is missing in object literal [1].
  450.  
  451. [1] 151│ state = {
  452. 152│ activeTab: 'data',
  453. 153│ };
  454. :
  455. 214│ };
  456. 215│
  457. 216│ buildRow = (header: Header, index: number) => {
  458. 217│ const {selectedHeaderIds} = this.state;
  459. 218│ const selectedId = selectedHeaderIds
  460. 219│ ? selectedHeaderIds.length === 1
  461. 220│ ? selectedHeaderIds[0]
  462.  
  463.  
  464. Error ┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈ src/plugins/network/MockResponseDetails.js:220:11
  465.  
  466. Cannot get selectedHeaderIds[0] because tuple type [1] only has 0 elements, so index 0 is out of bounds.
  467.  
  468. [1] 36│ selectedHeaderIds: [],
  469. :
  470. 217│ const {selectedHeaderIds} = this.state;
  471. 218│ const selectedId = selectedHeaderIds
  472. 219│ ? selectedHeaderIds.length === 1
  473. 220│ ? selectedHeaderIds[0]
  474. 221│ : null
  475. 222│ : 0;
  476. 223│ return {
  477.  
  478.  
  479. Error ┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈ src/plugins/network/MockResponseDetails.js:281:12
  480.  
  481. Property selectedHeaderIds is missing in object literal [1].
  482.  
  483. [1] 151│ state = {
  484. 152│ activeTab: 'data',
  485. 153│ };
  486. :
  487. 278│ deleteRow = () => {
  488. 279│ const route = this.props.route;
  489. 280│ const headers = route.headers;
  490. 281│ const {selectedHeaderIds} = this.state;
  491. 282│ const selectedId = selectedHeaderIds
  492. 283│ ? selectedHeaderIds.length === 1
  493. 284│ ? selectedHeaderIds[0]
  494.  
  495.  
  496. Error ┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈ src/plugins/network/MockResponseDetails.js:284:11
  497.  
  498. Cannot get selectedHeaderIds[0] because tuple type [1] only has 0 elements, so index 0 is out of bounds.
  499.  
  500. [1] 36│ selectedHeaderIds: [],
  501. :
  502. 281│ const {selectedHeaderIds} = this.state;
  503. 282│ const selectedId = selectedHeaderIds
  504. 283│ ? selectedHeaderIds.length === 1
  505. 284│ ? selectedHeaderIds[0]
  506. 285│ : null
  507. 286│ : 0;
  508. 287│ headers.splice(selectedId, 1);
  509.  
  510.  
  511. Error ┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈ src/plugins/network/MockResponseDetails.js:287:20
  512.  
  513. Cannot call headers.splice with selectedId bound to start because:
  514. • undefined (out of bounds tuple access) [1] is incompatible with number [2].
  515. • null [3] is incompatible with number [2].
  516.  
  517. src/plugins/network/MockResponseDetails.js
  518. [1] 284│ ? selectedHeaderIds[0]
  519. [3] 285│ : null
  520. 286│ : 0;
  521. 287│ headers.splice(selectedId, 1);
  522. 288│ route.headers = headers;
  523. 289│ this.updateRouteChange(route);
  524. 290│ };
  525.  
  526. /private/tmp/flow/flowlib_1c80054e/core.js
  527. [2] 291│ splice(start: number, deleteCount?: number, ...items: Array<T>): Array<T>;
  528.  
  529.  
  530. Error ┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈ src/plugins/network/index.js:119:54
  531.  
  532. Cannot extend FlipperPlugin [1] with .*default* because property isMockResponseSupported is missing in
  533. PersistedState [2] but exists in object literal [3] in property defaultPersistedState.
  534.  
  535. 116│ paddingTop: 4,
  536. 117│ });
  537. 118│
  538. [1][2] 119│ export default class extends FlipperPlugin<State, *, PersistedState> {
  539. 120│ static keyboardActions = ['clear'];
  540. 121│ static subscribed = [];
  541. [3] 122│ static defaultPersistedState = {
  542. 123│ requests: {},
  543. 124│ responses: {},
  544. 125│ routes: [],
  545. 126│ showMockResponseDialog: false,
  546. 127│ isMockResponseSupported: false,
  547. 128│ };
  548. 129│
  549. 130│ static metricsReducer = (
  550. 131│ persistedState: PersistedState,
  551. 132│ ): Promise<MetricType> => {
  552. 133│ const failures = Object.keys(persistedState.responses).reduce(function(
  553. :
  554. 290│ showMockResponseDialog={showMockResponseDialog}
  555. 291│ clear={this.clearLogs}
  556. 292│ copyRequestCurlCommand={this.copyRequestCurlCommand}
  557. 293│ onRowHighlighted={this.onRowHighlighted}
  558. 294│ highlightedRows={
  559. 295│ this.state.selectedIds ? new Set(this.state.selectedIds) : null
  560. 296│ }
  561. 297│ handleRoutesChange={this.handleRoutesChange}
  562. 298│ isMockResponseSupported={this.state.isMockResponseSupported}
  563. 299│ />
  564. 300│ <DetailSidebar width={500}>{this.renderSidebar()}</DetailSidebar>
  565. 301│ </FlexColumn>
  566. 302│ );
  567. 303│ }
  568. 304│ }
  569. 305│
  570. 306│ type NetworkTableProps = {
  571. 307│ requests: {[id: RequestId]: Request},
  572.  
  573.  
  574. Error ┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈ src/plugins/network/index.js:189:21
  575.  
  576. Cannot call this.setState with object literal bound to partialState because:
  577. • Either property isMockResponseSupported is missing in State [1] but exists in object literal [2].
  578. • Or a call signature declaring the expected parameter / return type is missing in object literal [2] but exists in
  579. function type [3].
  580.  
  581. src/plugins/network/index.js
  582. [1] 119│ export default class extends FlipperPlugin<State, *, PersistedState> {
  583. :
  584. 186│ this.informClientMockChange(this.props.persistedState.routes);
  585. 187│ }
  586. 188│ this.client.supportsMethod('mockResponses').then(result =>
  587. [2] 189│ this.setState({
  588. 190│ isMockResponseSupported: result,
  589. 191│ }),
  590. 192│ );
  591. 193│ }
  592. 194│
  593.  
  594. /private/tmp/flow/flowlib_1c80054e/react.js
  595. [3] 35│ partialState: ?$Shape<State> | ((State, Props) => ?$Shape<State>),
  596.  
  597.  
  598. Error ┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈ src/plugins/network/index.js:226:28
  599.  
  600. Missing type annotation for routes.
  601.  
  602. 223│ this.props.setPersistedState({responses: {}, requests: {}});
  603. 224│ };
  604. 225│
  605. 226│ informClientMockChange = routes => {
  606. 227│ this.client.supportsMethod('mockResponses').then(supported => {
  607. 228│ if (supported) {
  608. 229│ this.client.call('mockResponses', {
  609.  
  610.  
  611. Error ┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈ src/plugins/network/index.js:298:47
  612.  
  613. Cannot get this.state.isMockResponseSupported because:
  614. • property isMockResponseSupported is missing in State [1].
  615. • property isMockResponseSupported is missing in object literal [2].
  616.  
  617. [1] 119│ export default class extends FlipperPlugin<State, *, PersistedState> {
  618. :
  619. [2] 201│ state = {
  620. 202│ selectedIds: this.props.deepLinkPayload ? [this.props.deepLinkPayload] : [],
  621. 203│ };
  622. :
  623. 295│ this.state.selectedIds ? new Set(this.state.selectedIds) : null
  624. 296│ }
  625. 297│ handleRoutesChange={this.handleRoutesChange}
  626. 298│ isMockResponseSupported={this.state.isMockResponseSupported}
  627. 299│ />
  628. 300│ <DetailSidebar width={500}>{this.renderSidebar()}</DetailSidebar>
  629. 301│ </FlexColumn>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement