Skip to content
This repository has been archived by the owner on May 25, 2019. It is now read-only.

Commit

Permalink
Updates types to exact
Browse files Browse the repository at this point in the history
The new version of apollo-codegen uses exact object types, so we need to update our type signatures to match.
  • Loading branch information
Fin Hopkins committed Jun 9, 2017
1 parent 3e3b072 commit da54ba8
Show file tree
Hide file tree
Showing 20 changed files with 146 additions and 177 deletions.
4 changes: 2 additions & 2 deletions components/map/LocationMap.js
Original file line number Diff line number Diff line change
Expand Up @@ -387,7 +387,7 @@ export default class LocationMap extends React.Component {
}

@action.bound
chooseLocation(location: {lat: number, lng: number}) {
chooseLocation(location: {| lat: number, lng: number |}) {
const { store: { mapLocation } } = this.props;
const currentLocation = mapLocation.location;

Expand Down Expand Up @@ -821,7 +821,7 @@ export default class LocationMap extends React.Component {
}
}

currentLocationClicked(pos: {lat: number, lng: number}) {
currentLocationClicked(pos: {| lat: number, lng: number |}) {
const { mode } = this.props;
if (mode === 'picker') {
this.chooseLocation(pos);
Expand Down
6 changes: 2 additions & 4 deletions components/map/RequestPopup.stories.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,8 @@ const NO_IMAGE_REQUEST: SearchCase = {
requestedAt: 0,
};

const IMAGE_REQUEST: SearchCase = {
...NO_IMAGE_REQUEST,
mediaUrl: 'https://pbs.twimg.com/media/C22X9ODXgAABGKS.jpg',
};
const IMAGE_REQUEST = Object.assign({}, NO_IMAGE_REQUEST);
IMAGE_REQUEST.mediaUrl = 'https://pbs.twimg.com/media/C22X9ODXgAABGKS.jpg';

storiesOf('RequestPopup', module)
.addDecorator((next) => (
Expand Down
10 changes: 0 additions & 10 deletions components/request/home/ChooseServicePane.stories.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,40 +11,30 @@ const SERVICE_SUMMARIES = [
name: 'Needle Removal',
code: 'SRTV-00000057',
description: 'Remove needles',
hasMetadata: true,
locationRequired: true,
group: null,
},
{
name: 'Park Lighting Issues',
code: 'SRTV-00000066',
description: 'Light the park',
hasMetadata: true,
locationRequired: true,
group: null,
},
{
name: 'Illegal Vending',
code: 'SRTV-00000080',
description: 'Vend illegally',
hasMetadata: true,
locationRequired: true,
group: null,
},
{
name: 'Empty Litter Basket',
code: 'SRTV-00000086',
description: 'Empty a litter basket',
hasMetadata: true,
locationRequired: true,
group: null,
},
{
name: 'Sidewalk Repair',
code: 'SRTV-00000092',
description: 'Sidewalk a repair',
hasMetadata: true,
locationRequired: true,
group: null,
},
];
Expand Down
2 changes: 0 additions & 2 deletions components/request/home/ChooseServicePane.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@ const SERVICE_SUMMARIES = [{
code: 'CSMCINC',
description: 'Something is threatening the fabric of the universe',
group: 'ultimate',
hasMetadata: true,
locationRequired: true,
}];

describe('rendering', () => {
Expand Down
10 changes: 0 additions & 10 deletions components/request/home/HomePane.stories.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,40 +12,30 @@ const SERVICE_SUMMARIES = [
code: 'SRTV-00000057',
description: 'Remove needles',
group: null,
hasMetadata: true,
locationRequired: true,
},
{
name: 'Park Lighting Issues',
code: 'SRTV-00000066',
description: 'Light the park',
group: null,
hasMetadata: true,
locationRequired: true,
},
{
name: 'Illegal Vending',
code: 'SRTV-00000080',
description: 'Vend illegally',
group: null,
hasMetadata: true,
locationRequired: true,
},
{
name: 'Empty Litter Basket',
code: 'SRTV-00000086',
description: 'Empty a litter basket',
group: null,
hasMetadata: true,
locationRequired: true,
},
{
name: 'Sidewalk Repair',
code: 'SRTV-00000092',
description: 'Sidewalk a repair',
group: null,
hasMetadata: true,
locationRequired: true,
},
];

Expand Down
2 changes: 0 additions & 2 deletions components/request/home/HomePane.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@ const SERVICE_SUMMARIES = [{
code: 'CSMCINC',
description: 'Something is threatening the fabric of the universe',
group: 'ultimate',
hasMetadata: true,
locationRequired: true,
}];

describe('rendering', () => {
Expand Down
4 changes: 2 additions & 2 deletions components/request/request/AttributeField.stories.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import Question from '../../../data/store/Question';
import AttributeField from './AttributeField';

const makeQuestion = (attrs: Object, value: string | string[] = '') => {
const question = new Question({
const question = new Question(({
code: '',
conditionalValues: null,
dependencies: null,
Expand All @@ -16,7 +16,7 @@ const makeQuestion = (attrs: Object, value: string | string[] = '') => {
values: null,
type: null,
...attrs,
});
}: any));

question.value = value;

Expand Down
2 changes: 1 addition & 1 deletion components/search/SearchLayout.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ import RecentRequestsSearchForm from './RecentRequestsSearchForm';
type SearchData = {|
view: 'search',
query: string,
location: ?{lat: number, lng: number},
location: ?{| lat: number, lng: number |},
zoom: ?number,
|}

Expand Down
Loading

0 comments on commit da54ba8

Please sign in to comment.