【发布时间】:2020-01-08 05:07:13
【问题描述】:
我在这两个包中看到了许多相同的方法,当我使用 ms-rest-azure(loginWithServicePrincipalSecret) 创建凭据并使用凭据实例化 SubscriptionClient 时,出现错误:
Argument of type 'ApplicationTokenCredentials' is not assignable to parameter of type 'ServiceClientCredentials'.
Types of property 'signRequest' are incompatible.
Type '(webResource: WebResource, callback: (err: Error) => void) => void' is not assignable to type '(webResource: WebResource) => Promise<WebResource>'.ts(2345)
但是当我更改为 @azure/ms-rest-nodeauth 并使用 loginWithServicePrincipalSecret 创建凭据并使用凭据实例化 SubscriptionClient 时,它运行良好。
所以我想知道为什么以及@azure/ms-rest-nodeauth 和 ms-rest-azure 之间的区别。
谢谢。
【问题讨论】:
标签: javascript node.js azure