document.SaveAs is undefined when trying to save the current document as a jpg

I have a react UXP plugin in which I am trying to save the current document (app.ActiveDocument) as a jpg.
I found this reference for saveAs
https://www.adobe.io/photoshop/uxp/2022/ps_reference/classes/document/#saveas

However when I try and access saveAs it is undefined.

I found the following topic which I assume saveAs is a new feature and so I am assuming that it is not available as I created my plugin a while ago.

Is this assumption likely to be correct?
If so, how would I get access to the saveAs feature in my plugin? Would I update the Photoshop Version in the manifest? (the current version is “22.0.0” so that matches the docs above)

Apologies if this is a basic question - but I am just starting out in my plugin adventure!
Thanks

Yes, dev docs are still not good (slowly getting better though) :frowning: Methods should have clear notes since which version they are available and what changed in which version…

So, seeing dates when topic was created, I’d say this method is available only for v 23.0 (CC 2022) and up


Edit: I see what you mean now. Also checked that linked changelog and it states

since the MAX 2020 (Adobe Photoshop 22.0) release

So it should work :confused:

So I checked, and I am told that you:

…need to specify that they’re using a minimum version of Ps 23 & and that they specify that they are using apiLevel 2 in their manifest.

About this part:

Every basic question is onboarding another beginner, so I say go for it! More questions means more adventure! :wink:

Why would docs then state v22.0? :thinking:
Any plans to update all the docs properly? Because now even parameters for some methods are completely wrong :frowning:

Thanks Erin. Thats really useful to know. For the time being I managed to do it with batchPlay, then at least I can keep supporting version 22.

Please open a github issue on any incorrect doc pages you happen to find. We’ll get them updated! (There’s a bug icon with “log an issue” in the upper right corner that will take you to the right place…)

I’m sorry, but it’s really too much trouble to go through almost all pages and report all bugs. Some newer pages are pretty much up to date (like constants or executeAsModal), but older ones are almost all out of date. Some more, some less

Just a couple examples:

And there are many more. I would be submitting issues more than developing a plugin :frowning:
I remember I wanted to contribute to the docs, but the process with the NDA is insane, so just decided to leave it alone :thinking: