Skip to content

Commit 7d2389b

Browse files
committed
fix: changed some types to be interfaces such they can be augmented in client projects.
1 parent fe8042f commit 7d2389b

File tree

4 files changed

+13
-9
lines changed

4 files changed

+13
-9
lines changed

packages/core/src/model/json-definitions/QuickFormDefinition.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { QuickFormQuestionsDefinition } from "./QuickFormQuestionsDefinition";
44
import { QuickFormSubmitDefinition } from "./QuickFormSubmitDefinition";
55
import { LayoutDefinition } from "./Layout";
66

7-
export type QuickFormDefinition = {
7+
export interface QuickFormDefinition {
88
validation?: {
99
messages?: {
1010
"NOT_ALL_QUESTIONS_ANSWERED"?: string,
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
import { QuestionJsonModel } from "./JsonDataModels";
22

3-
export type QuickFormQuestionsDefinition = { [logicalName: string]: QuestionJsonModel; };
3+
export interface QuickFormQuestionsDefinition { [logicalName: string]: QuestionJsonModel; };

packages/designer/src/Types/QuickFormDefinition.ts

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,17 @@
1+
import exp from "constants";
12
import { Locale } from "./Locale";
23
import { ViewNames } from "./ViewNames";
34
import { QuickFormDefinition } from "@eavfw/quickform-core";
45

5-
export type QuickFormDesignerDefinition = {
6-
__designer: {
7-
activeView?: ViewNames;
8-
activeSlide?: string;
9-
activeQuestion?: string;
10-
},
6+
export interface QuickFormDesignerState {
7+
activeView?: ViewNames;
8+
activeSlide?: string;
9+
activeQuestion?: string;
10+
[key: string]: string | undefined;
11+
}
12+
13+
export type QuickFormDesignerDefinition = {
14+
__designer: QuickFormDesignerState,
1115
designerLocale?: Locale,
1216
questions: {
1317
[key: string]: {
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
export type ViewNames = "settings" | "intro" | "submit" | "ending" | "layout" | "questions" | "sourceView";
1+
export type ViewNames = "settings" | "intro" | "submit" | "ending" | "layout" | "questions" | "sourceView" | string;

0 commit comments

Comments
 (0)