let options = {
title: "Race selection",
message: "Are you sure you want to be a Unicorn?",
okButtonText: "Yes",
cancelButtonText: "No",
neutralButtonText: "Cancel"
};
error TS2345: Argument of type '{ title: string; message: string; okButtonText: string; cancelButtonText: string; neutralButtonText: string; }' is not assignable to parameter of type 'string'.
Documentation page says I can use the alert function like the below https://docs.nativescript.org/angular/ui/ng-components/dialogs#confirm-dialog
let options = { title: "Race selection", message: "Are you sure you want to be a Unicorn?", okButtonText: "Yes", cancelButtonText: "No", neutralButtonText: "Cancel" };
confirm(options).then((result: boolean) => { console.log(result); });
But angular does not allow me
error TS2345: Argument of type '{ title: string; message: string; okButtonText: string; cancelButtonText: string; neutralButtonText: string; }' is not assignable to parameter of type 'string'.