fix: Typehint fixes
This commit is contained in:
parent
ca292960ff
commit
d1a0986ba4
2
.gitignore
vendored
2
.gitignore
vendored
@ -6,3 +6,5 @@ coverage
|
|||||||
.vscode
|
.vscode
|
||||||
*.sublime-project
|
*.sublime-project
|
||||||
*.sublime-workspace
|
*.sublime-workspace
|
||||||
|
*.dev.tale.vue
|
||||||
|
*.dev.stories.js
|
||||||
|
@ -167,7 +167,7 @@ export default class Formulario {
|
|||||||
* Given an array, this function will attempt to make sense of the given error
|
* Given an array, this function will attempt to make sense of the given error
|
||||||
* and hydrate a form with the resulting errors.
|
* and hydrate a form with the resulting errors.
|
||||||
*/
|
*/
|
||||||
handle (error: any, formName: string, skip: boolean = false) {
|
handle (error: any, formName: string, skip = false) {
|
||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
const e = skip ? error : this.options.errorHandler(error, formName)
|
const e = skip ? error : this.options.errorHandler(error, formName)
|
||||||
if (formName && this.registry.has(formName)) {
|
if (formName && this.registry.has(formName)) {
|
||||||
@ -184,7 +184,7 @@ export default class Formulario {
|
|||||||
/**
|
/**
|
||||||
* Reset a form.
|
* Reset a form.
|
||||||
*/
|
*/
|
||||||
reset (formName: string, initialValue: Object = {}) {
|
reset (formName: string, initialValue: Record<string, any> = {}) {
|
||||||
this.resetValidation(formName)
|
this.resetValidation(formName)
|
||||||
this.setValues(formName, initialValue)
|
this.setValues(formName, initialValue)
|
||||||
}
|
}
|
||||||
|
@ -18,6 +18,8 @@ import Registry from '@/libs/registry'
|
|||||||
import FormSubmission from '@/FormSubmission'
|
import FormSubmission from '@/FormSubmission'
|
||||||
import FormularioInput from '@/FormularioInput.vue'
|
import FormularioInput from '@/FormularioInput.vue'
|
||||||
|
|
||||||
|
import { ErrorObserver } from '@/validation/types'
|
||||||
|
|
||||||
@Component({ name: 'FormularioForm' })
|
@Component({ name: 'FormularioForm' })
|
||||||
export default class FormularioForm extends Vue {
|
export default class FormularioForm extends Vue {
|
||||||
@Provide() formularioFieldValidation (errorObject): void {
|
@Provide() formularioFieldValidation (errorObject): void {
|
||||||
|
@ -63,7 +63,7 @@ export default class FormularioInput extends Vue {
|
|||||||
@Prop({
|
@Prop({
|
||||||
type: [String, Boolean, Array],
|
type: [String, Boolean, Array],
|
||||||
default: false,
|
default: false,
|
||||||
}) validation
|
}) validation!: string|any[]|boolean
|
||||||
|
|
||||||
@Prop({
|
@Prop({
|
||||||
type: [String, Boolean],
|
type: [String, Boolean],
|
||||||
|
Loading…
Reference in New Issue
Block a user