From fb2369751350f864c97d159a4614873cf28524c6 Mon Sep 17 00:00:00 2001 From: Joren Broekema Date: Mon, 10 Aug 2020 13:44:11 +0200 Subject: [PATCH] chore: add form-core type d file for index and change tsc cfg --- .changeset/large-jokes-train.md | 5 ++++ packages/form-core/index.d.ts | 52 +++++++++++++++++++++++++++++++++ tsconfig.build.types.json | 2 +- 3 files changed, 58 insertions(+), 1 deletion(-) create mode 100644 .changeset/large-jokes-train.md create mode 100644 packages/form-core/index.d.ts diff --git a/.changeset/large-jokes-train.md b/.changeset/large-jokes-train.md new file mode 100644 index 000000000..84573842d --- /dev/null +++ b/.changeset/large-jokes-train.md @@ -0,0 +1,5 @@ +--- +'@lion/form-core': patch +--- + +Add index.d.ts file so that its types can be used across lion. Add package root index.js to TSC build config exclude filter to prevent TSC from erroring on already existing type definition files. diff --git a/packages/form-core/index.d.ts b/packages/form-core/index.d.ts new file mode 100644 index 000000000..fc1db61f0 --- /dev/null +++ b/packages/form-core/index.d.ts @@ -0,0 +1,52 @@ +export { FocusMixin } from './src/FocusMixin.js'; +export { FormatMixin } from './src/FormatMixin.js'; +export { FormControlMixin } from './src/FormControlMixin.js'; +export { InteractionStateMixin } from './src/InteractionStateMixin.js'; // applies FocusMixin +export { LionField } from './src/LionField.js'; +export { FormRegisteringMixin } from './src/registration/FormRegisteringMixin.js'; +export { FormRegistrarMixin } from './src/registration/FormRegistrarMixin.js'; +export { FormRegistrarPortalMixin } from './src/registration/FormRegistrarPortalMixin.js'; +export { FormControlsCollection } from './src/registration/FormControlsCollection.js'; + +// validate + +export { ValidateMixin } from './src/validate/ValidateMixin.js'; +export { Unparseable } from './src/validate/Unparseable.js'; +export { Validator } from './src/validate/Validator.js'; +export { ResultValidator } from './src/validate/ResultValidator.js'; + +export { Required } from './src/validate/validators/Required.js'; + +export { + IsString, + EqualsLength, + MinLength, + MaxLength, + MinMaxLength, + IsEmail, + Pattern, +} from './src/validate/validators/StringValidators.js'; + +export { + IsNumber, + MinNumber, + MaxNumber, + MinMaxNumber, +} from './src/validate/validators/NumberValidators.js'; + +export { + IsDate, + MinDate, + MaxDate, + MinMaxDate, + IsDateDisabled, +} from './src/validate/validators/DateValidators.js'; + +export { DefaultSuccess } from './src/validate/resultValidators/DefaultSuccess.js'; + +export { LionValidationFeedback } from './src/validate/LionValidationFeedback.js'; + +export { ChoiceGroupMixin } from './src/choice-group/ChoiceGroupMixin.js'; +export { ChoiceInputMixin } from './src/choice-group/ChoiceInputMixin.js'; + +export { FormGroupMixin } from './src/form-group/FormGroupMixin.js'; diff --git a/tsconfig.build.types.json b/tsconfig.build.types.json index 9f141ac1b..e1b9a41da 100644 --- a/tsconfig.build.types.json +++ b/tsconfig.build.types.json @@ -5,5 +5,5 @@ "emitDeclarationOnly": true, "noEmit": false }, - "exclude": ["packages/*/index.d.ts"] + "exclude": ["packages/*/index.js"] }