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
Hi, thanks for making the typings for XD, it's a big help. Here are a couple problems I've come across:
If I type selection as XDSelection and I try to then access, selection.items[0].text I get an error, "Property 'text' does not exist on 'SceneNode'"
If I type foo (ex. a Group) as SceneNode and I try to access foo.sharedPluginData.getAll() I get an error, "Property 'sharedPluginData' does not exist on type 'SceneNode'."
The text was updated successfully, but these errors were encountered:
Since I'm currently dealing with an ear infection, just a very quick, undetailed answer (in the hopes that it still helps):
That's to be expected as at this point, it is not established that it is, in fact, a Text node. Please take a look at the sample.js file. You can use instanceof to check the type and use its properties 🙂
We're currently in the process of integrating the new APIs (including sharedPluginData) into the types. Cf. Xd 29 updates #77. When it's merged, sharedPluginData will be available 🙂 .
Hi, thanks for making the typings for XD, it's a big help. Here are a couple problems I've come across:
XDSelection
and I try to then access,selection.items[0].text
I get an error, "Property 'text' does not exist on 'SceneNode'"SceneNode
and I try to accessfoo.sharedPluginData.getAll()
I get an error, "Property 'sharedPluginData' does not exist on type 'SceneNode'."The text was updated successfully, but these errors were encountered: