Skip to content
This repository has been archived by the owner on Dec 22, 2023. It is now read-only.

Commit

Permalink
Fix typings
Browse files Browse the repository at this point in the history
  • Loading branch information
matthieujabbour committed May 19, 2021
1 parent fd0b93c commit 13cca8c
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 4 deletions.
2 changes: 2 additions & 0 deletions library/src/scripts/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ declare module 'scripts/types' {
import fieldPropTypes from 'scripts/propTypes/field';
import configurationPropTypes from 'scripts/propTypes/configuration';

// eslint-disable-next-line @typescript-eslint/no-explicit-any
export type Json = any;
export type FormValue = Json;
export type Plugin = (engine: Engine) => void;
export type Step = InferProps<typeof stepPropTypes>;
Expand Down
9 changes: 7 additions & 2 deletions library/src/scripts/vue/components/Field.vue
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,12 @@
/* eslint-disable vue/one-component-per-file */
import {
Json,
Field,
Generic,
FormValue,
} from 'scripts/types';
import {
UIRadio,
UIButton,
Expand All @@ -33,8 +39,7 @@ import {
UIFileUploader,
} from 'sonar-ui/vue';
import Vue from 'vue';
import { ExtendedVue } from 'vue/types/vue';
import { Field, Generic, FormValue } from 'scripts/types';
import { ExtendedVue } from 'vue/types/vue.d';
type Components = { [type: string]: Component; };
type Component = (field: Field, onUserAction: (newValue: FormValue) => void) => Json;
Expand Down
3 changes: 2 additions & 1 deletion library/src/scripts/vue/components/Step.vue
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,11 @@
*/
import {
Field as FormField,
Json,
Generic,
FormValue,
UserAction,
Field as FormField,
} from 'scripts/types';
import Vue from 'vue';
import { buildClass } from 'sonar-ui/vue';
Expand Down
3 changes: 2 additions & 1 deletion library/src/scripts/vue/containers/Form.vue
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,15 @@
*
*/
import Vue from 'vue';
import {
Json,
Field,
Generic,
FormValue,
UserAction,
Configuration,
} from 'scripts/types';
import Vue from 'vue';
import Engine from 'scripts/core/Engine';
import Step from 'scripts/vue/components/Step.vue';
Expand Down

0 comments on commit 13cca8c

Please sign in to comment.