Skip to content

Commit

Permalink
feat: add boolean type support (fixes #6)
Browse files Browse the repository at this point in the history
  • Loading branch information
gajus committed Nov 11, 2017
1 parent d34eed1 commit a2e6b9a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/utilities/mapFlowType.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@ export default (databaseTypeName: string): string => {
return 'string';
}

if (databaseTypeName === 'boolean') {
return 'boolean';
}

if (databaseTypeName === 'bigint' || databaseTypeName === 'integer') {
return 'number';
}
Expand Down
1 change: 1 addition & 0 deletions test/utilities/mapFlowTypes.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import mapFlowType from '../../src/utilities/mapFlowType';

const knownTypes = {
bigint: 'number',
boolean: 'boolean',
character: 'string',
coordinates: 'string',
integer: 'number',
Expand Down

0 comments on commit a2e6b9a

Please sign in to comment.