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

View File

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