From a2e6b9aff5bbfafb3aa354a071c568bb60bea884 Mon Sep 17 00:00:00 2001 From: Gajus Kuizinas Date: Sat, 11 Nov 2017 14:50:50 +0000 Subject: [PATCH] feat: add boolean type support (fixes #6) --- src/utilities/mapFlowType.js | 4 ++++ test/utilities/mapFlowTypes.js | 1 + 2 files changed, 5 insertions(+) diff --git a/src/utilities/mapFlowType.js b/src/utilities/mapFlowType.js index 177dbc6..f1b4c6f 100644 --- a/src/utilities/mapFlowType.js +++ b/src/utilities/mapFlowType.js @@ -15,6 +15,10 @@ export default (databaseTypeName: string): string => { return 'string'; } + if (databaseTypeName === 'boolean') { + return 'boolean'; + } + if (databaseTypeName === 'bigint' || databaseTypeName === 'integer') { return 'number'; } diff --git a/test/utilities/mapFlowTypes.js b/test/utilities/mapFlowTypes.js index 97b6d7d..6274c6e 100644 --- a/test/utilities/mapFlowTypes.js +++ b/test/utilities/mapFlowTypes.js @@ -5,6 +5,7 @@ import mapFlowType from '../../src/utilities/mapFlowType'; const knownTypes = { bigint: 'number', + boolean: 'boolean', character: 'string', coordinates: 'string', integer: 'number',