Node.js 如何使用这个包-xd文件?

Node.js 如何使用这个包-xd文件?,node.js,typescript,npm,Node.js,Typescript,Npm,我正在尝试使用此软件包来操作Adobe XD文件 链接到程序包: 我需要在JavaScript文件中使用此代码段。我正在使用Node.js 我需要使用的方法是readXDFile,自述文件中显示的代码段是: (filePath: string) => Promise<{ document: Object, interactions: Object, metadata: Object, resources: Object, artboards: Array<O

我正在尝试使用此软件包来操作Adobe XD文件

链接到程序包:

我需要在JavaScript文件中使用此代码段。我正在使用Node.js

我需要使用的方法是readXDFile,自述文件中显示的代码段是:

(filePath: string) => Promise<{
  document: Object,
  interactions: Object,
  metadata: Object,
  resources: Object,
  artboards: Array<Object>,
}>
以下是输出:

Promise { <pending> }

谢谢

根据我的理解,它返回了一个承诺,您应该使用what call
asyns/await

感谢您的反馈!我已经用解决方案更新了问题!
Promise { <pending> }
xdData.then(                                       
    function (value) { console.log(value) },
    function (error) { console.log(error) }
);