Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
public changeRequired(newValue: string): void {
this.model().required = newValue === "required";
let nt: SimplifiedPropertyType = SimplifiedPropertyType.fromPropertySchema(this.item);
nt.required = this.model().required;
let command: ICommand = CommandFactory.createChangePropertyTypeCommand(this.item, nt);
this.commandService.emit(command);
}
protected updateModel(): void {
this._model = SimplifiedPropertyType.fromPropertySchema(this.item);
}
public displayType(): SimplifiedParameterType {
return SimplifiedPropertyType.fromPropertySchema(this.item);
}