In a Windows 10 Universal app, I'm trying to use the FileSavePicker to select a file. I am using Typescript. The insert method takes two parameters, a string and an IVector. The following code is from the MS website, but it is just straight javascript.
In a Windows 10 Universal app, I'm trying to use the FileSavePicker to select a file. I am using Typescript. The insert method takes two parameters, a string and an IVector. The following code is from the MS website, but it is just straight javascript.
savePicker.fileTypeChoices.insert("Word Document", [".docx"]);
The error text is, "Argument of type string[] is not assignable to parameter of type IVector". I have been able to get it to work using this:
var tempVec: Windows.Foundation.Collections.IVector;
tempVec.append(".docx");
savePicker.fileTypeChoices.insert("Word Document", tempVec);
That seems unreasonably verbose. Is there a better syntax for accomplishing this?
http://stackoverflow.com/questions/33792978/how-to-pass-ivectorstring-in-typescript