import { QuestionAdornerViewModel } from "@survey/creator" ; import * as ko from "knockout" ; import { SurveyTemplateRendererViewModel , Question } from "survey-core" ; import { createQuestionViewModel } from "./question" ; const template = require ( "./question-widget.html" ) ; ko . components . register ( "svc-widget-question" , { viewModel : { createViewModel : ( params , componentInfo ) => { const model = new QuestionAdornerViewModel ( params . componentData , params . templateData . data as Question , params . templateData ) ; createQuestionViewModel ( params , componentInfo , model ) ; return model ; } } , template : template } ) ;