You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Please forgive me if some of my terminology is incorrect, I'm fairly new to JXA and I haven't been able to find much documentation on it.
I'm using this project in a TypeScript application and it's working great - thank you for such a cool idea and execution.
I've run into an issue with setting read-write variables. The current typings are fine for retrieving an attribute such as .index()
constwindowIndex=safariWindow.index()
But there doesn't seem like there is a way to set the attribute without TS complaining. The two ways of setting that I am aware of are
safariWindow.index=0safariWindow.index.set(0)
I have had a think and I don't believe we can make a TS type to satisfy both the function call getter and the direct assignment setter, so I propose new interfaces that can be added to the .d.ts files for ReadOnly and ReadWrite attributes.
Please forgive me if some of my terminology is incorrect, I'm fairly new to JXA and I haven't been able to find much documentation on it.
I'm using this project in a TypeScript application and it's working great - thank you for such a cool idea and execution.
I've run into an issue with setting read-write variables. The current typings are fine for retrieving an attribute such as
.index()
But there doesn't seem like there is a way to set the attribute without TS complaining. The two ways of setting that I am aware of are
I have had a think and I don't believe we can make a TS type to satisfy both the function call getter and the direct assignment setter, so I propose new interfaces that can be added to the .d.ts files for ReadOnly and ReadWrite attributes.
e.g.
If this would be a useful and acceptable change for you, I'd be happy to do the work and make a PR.
The text was updated successfully, but these errors were encountered: