-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #103 from riccardofano/mappings-to-ts
Convert mappings to TS instead of JSON
- Loading branch information
Showing
4 changed files
with
35 additions
and
42 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 was deleted.
Oops, something went wrong.
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,26 @@ | ||
import { CategoryName } from './types/Category' | ||
|
||
export type Mapping = { category: CategoryName; degree: number } | ||
|
||
export const MAPPINGS: Record<string, Mapping> = { | ||
figlio: { category: 'children', degree: 1 }, | ||
'nipote in linea retta': { category: 'children', degree: 2 }, | ||
'pronipote in linea retta': { category: 'children', degree: 3 }, | ||
'abnipote in linea retta': { category: 'children', degree: 4 }, | ||
genitore: { category: 'ascendants', degree: 1 }, | ||
fratello: { category: 'bilateral', degree: 2 }, | ||
'nipote in linea collaterale': { category: 'children', degree: 3 }, | ||
'pronipote in linea collaterale': { category: 'children', degree: 4 }, | ||
'abnipote in linea collaterale': { category: 'children', degree: 5 }, | ||
zio: { category: 'others', degree: 3 }, | ||
cugino: { category: 'children', degree: 4 }, | ||
'figlio di cugino': { category: 'children', degree: 5 }, | ||
'nipote di cugino': { category: 'children', degree: 6 }, | ||
nonno: { category: 'ascendants', degree: 2 }, | ||
prozio: { category: 'others', degree: 4 }, | ||
'secondo cugino': { category: 'children', degree: 5 }, | ||
'figlio di secondo cugino': { category: 'children', degree: 6 }, | ||
bisavo: { category: 'ascendants', degree: 3 }, | ||
trisavo: { category: 'children', degree: 4 }, | ||
coniuge: { category: 'spouse', degree: 1 }, | ||
} |
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