From 15ab87aac5914bbadb0c7c346b09dfdfe6c920fc Mon Sep 17 00:00:00 2001 From: Jacob Nguyen <76754747+jacoobes@users.noreply.github.com> Date: Sun, 20 Feb 2022 10:48:24 -0600 Subject: [PATCH] refactor(handler): exported the option builder v0.0.1 --- src/handler/utilities/utilsExports.ts | 5 +++++ src/index.ts | 2 +- src/types/options.ts | 3 ++- 3 files changed, 8 insertions(+), 2 deletions(-) create mode 100644 src/handler/utilities/utilsExports.ts diff --git a/src/handler/utilities/utilsExports.ts b/src/handler/utilities/utilsExports.ts new file mode 100644 index 0000000..ab40e52 --- /dev/null +++ b/src/handler/utilities/utilsExports.ts @@ -0,0 +1,5 @@ +import * as Preprocessors from './preprocessors/args'; +import { Option as OptionBuilder } from './higherOrders'; + +module.exports = { OptionBuilder, Preprocessors }; +export { OptionBuilder, Preprocessors }; \ No newline at end of file diff --git a/src/index.ts b/src/index.ts index 8de4cb0..bb809ac 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,5 +1,5 @@ import * as Sern from './handler/sern'; -import * as Utils from './handler/utilities/preprocessors/args'; +import * as Utils from './handler/utilities/utilsExports'; import * as Types from './types/handler'; module.exports = { Sern, Utils, Types }; diff --git a/src/types/options.ts b/src/types/options.ts index f471762..439d2e5 100644 --- a/src/types/options.ts +++ b/src/types/options.ts @@ -8,7 +8,8 @@ import type { ApplicationCommandSubGroupData } from 'discord.js'; -type BaseOption = { name : string, description : string, required : false }; +// TODO : make required property optional +type BaseOption = { name : string, description : string, required : false }; export interface OptionData { SUB_COMMAND: ApplicationCommandSubCommandData