-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(types): add types via flow - EUBFR-72 (#45)
* Add flow * Add Project type * Add eslint plugin for flow * Type alias being modular * Describe project's basic fields * Include flow in the pipeline * Easier call to flow bin
- Loading branch information
1 parent
e1fcee5
commit a290858
Showing
9 changed files
with
188 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
[ignore] | ||
.*/__tests__/.* | ||
.*/node_modules/.* | ||
.*\.ignore\.js | ||
|
||
[include] | ||
|
||
[libs] | ||
|
||
[lints] | ||
|
||
[options] | ||
|
||
[strict] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
{ | ||
"presets": [ | ||
"flow", | ||
[ | ||
"env", | ||
{ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
// @flow | ||
|
||
// Project model is discussed in EUBFR-4 EUBFR-5 and EUBFR-70 | ||
|
||
type Result = { | ||
result: string, | ||
}; | ||
|
||
type Geolocation = { | ||
lat: string, | ||
lon: string, | ||
}; | ||
|
||
type Location = { | ||
country_name?: string, | ||
country_code: string, | ||
geolocation: Geolocation, | ||
}; | ||
|
||
type Timeframe = { | ||
from: string | null, | ||
to: string | null, | ||
}; | ||
|
||
type Coordinator = { | ||
name: string, | ||
type?: string, | ||
address?: string, | ||
region?: string, | ||
country?: string, | ||
website?: string, | ||
phone?: string, | ||
email?: string, | ||
}; | ||
|
||
type Partner = { | ||
name: string, | ||
type?: string, | ||
address?: string, | ||
region?: string, | ||
country?: string, | ||
website?: string, | ||
}; | ||
|
||
type Budget = { | ||
eu_contrib: number, | ||
total_cost?: string | null, | ||
private_fund?: string | null, | ||
public_fund?: string | null, | ||
other_contrib?: string | null, | ||
funding_area?: string | null, | ||
}; | ||
|
||
export type Project = { | ||
project_id: string, | ||
title: string, | ||
description: string, | ||
cover_image: string, | ||
programme_name: string, | ||
project_website: string, | ||
budget: Budget, | ||
results: Result, | ||
timeframe: Timeframe, | ||
ec_priorities: Array<string>, | ||
coordinators: Array<Coordinator>, | ||
partners: Array<Partner>, | ||
project_locations: Array<Location>, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters