Add prop type

This commit is contained in:
Ramon Wenger 2022-02-18 17:33:16 +01:00
parent 46f46f319e
commit 8185ca056f
2 changed files with 5 additions and 2 deletions

View File

@ -119,7 +119,7 @@
</template> </template>
<script lang="ts"> <script lang="ts">
import Vue from 'vue'; import Vue, {PropType} from 'vue';
import Toggle from '@/components/ui/Toggle.vue'; import Toggle from '@/components/ui/Toggle.vue';
import ContentFormSection from '@/components/content-block-form/ContentFormSection.vue'; import ContentFormSection from '@/components/content-block-form/ContentFormSection.vue';
import InputWithLabel from '@/components/ui/InputWithLabel.vue'; import InputWithLabel from '@/components/ui/InputWithLabel.vue';
@ -141,7 +141,7 @@
default: '', default: '',
}, },
contentBlock: { contentBlock: {
type: Object, type: Object as PropType<ContentBlock>,
required: true, required: true,
}, },
}, },

View File

@ -1,8 +1,11 @@
export type numberOrUndefined = number | undefined; export type numberOrUndefined = number | undefined;
type types = 'task' | 'normal' | 'base_communication' | 'base_society' | 'base_interdisciplinary';
export interface ContentBlock { export interface ContentBlock {
title: string; title: string;
contents: any[]; contents: any[];
id: string | undefined; id: string | undefined;
isAssignment: boolean; isAssignment: boolean;
type: types;
} }