From 52903daf34c0d272b51814600b51975e88cdde7d Mon Sep 17 00:00:00 2001 From: Nick Pafundi Date: Tue, 15 Jun 2021 12:52:37 -0400 Subject: [PATCH] add interface for form validator yielded hash --- .../gavant-ember-validations/form-validator.d.ts | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/types/@gavant/gavant-ember-validations/form-validator.d.ts b/types/@gavant/gavant-ember-validations/form-validator.d.ts index c8aef11..25d7051 100644 --- a/types/@gavant/gavant-ember-validations/form-validator.d.ts +++ b/types/@gavant/gavant-ember-validations/form-validator.d.ts @@ -6,6 +6,12 @@ import { GenericChangeset } from '@gavant/ember-validations/utilities/create-cha import FormValidatorChild from '@gavant/glint-template-types/types/@gavant/gavant-ember-validations/form-validator/child'; import InputValidator from '@gavant/glint-template-types/types/@gavant/gavant-ember-validations/input-validator'; +export interface FormValidatorYield { + submit: FormValidatorComponent['submitForm']; + input: ComponentWithBoundArgs; + child: ComponentWithBoundArgs; +} + export interface FormValidatorSignature { Element: HTMLFormElement; Args: { @@ -13,14 +19,7 @@ export interface FormValidatorSignature { submit: (changeset?: GenericChangeset, childChangesets?: GenericChangeset[]) => any; }; Yields: { - default: [ - GenericChangeset, - { - submit: FormValidatorComponent['submitForm']; - input: ComponentWithBoundArgs; - child: ComponentWithBoundArgs; - } - ]; + default: [GenericChangeset, FormValidatorYield]; }; }