diff options
| author | Andrej Mihajlov <and@mullvad.net> | 2018-02-16 14:11:34 +0100 |
|---|---|---|
| committer | Andrej Mihajlov <and@mullvad.net> | 2018-02-20 17:48:28 +0100 |
| commit | 2c741a45b85ec334c6c09be01f3062065c998265 (patch) | |
| tree | dea0731722ebbde98157f2798d3f33c41f2ded08 /app/components/Map.js | |
| parent | f58b1790b50abf340d8567b23b329ee9c0c14e3b (diff) | |
| download | mullvadvpn-2c741a45b85ec334c6c09be01f3062065c998265.tar.xz mullvadvpn-2c741a45b85ec334c6c09be01f3062065c998265.zip | |
Fix flow annotations to work on flow v0.66
Diffstat (limited to 'app/components/Map.js')
| -rw-r--r-- | app/components/Map.js | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/app/components/Map.js b/app/components/Map.js index d416b77961..3865e8975a 100644 --- a/app/components/Map.js +++ b/app/components/Map.js @@ -1,6 +1,6 @@ // @flow -import React from 'react'; +import * as React from 'react'; import { Component, View } from 'reactxp'; import SvgMap from './SvgMap'; @@ -21,11 +21,8 @@ type MapState = { } }; -export default class Map extends Component { - - props: MapProps; - - state: MapState = { +export default class Map extends Component<MapProps, MapState> { + state = { bounds: { width: 0, height: 0, @@ -84,6 +81,8 @@ export default class Map extends Component { case 'high': return 1; case 'medium': return 20; case 'low': return 40; + default: + throw new Error(`Invalid enumeration type: ${variant}`); } } @@ -93,6 +92,8 @@ export default class Map extends Component { return './assets/images/location-marker-secure.svg'; case 'unsecure': return './assets/images/location-marker-unsecure.svg'; + default: + throw new Error(`Invalid enumeration type: ${style}`); } } |
