Where can i find Type Definitions Files (*.d.ts) for Amazon Cognito Identity SDK? and how can i used them.
我在哪里可以找到Amazon Cognito Identity SDK的类型定义文件(* .d.ts)?我该如何使用它们。
I'm using TypeScript for Angular2 and i want to have the code assistant ready to use, when i implement "AWS Cognito". I already use import AWS = require("aws-sdk");
for the "aws-sdk" but i cant find a way to import the clases for "amazon Cognito Identity SDK". I already search in definitelytyped
我正在使用TypeScript for Angular2,当我实现“AWS Cognito”时,我希望代码助手可以使用。我已经使用了导入AWS = require(“aws-sdk”);对于“aws-sdk”但我无法找到导入“amazon Cognito Identity SDK”的分词的方法。我已经搜索过了
Note: I already know that i can declare a global variable of type "any" but what i want its the utility of the code assistant.
注意:我已经知道我可以声明一个类型为“any”的全局变量,但我希望它是代码助手的实用程序。
UPDATE: "aws-sdk" and "amazon Cognito Identity SDK" are different and have different classes.
更新:“aws-sdk”和“amazon Cognito Identity SDK”不同,并且有不同的类。
Update 2: I'm trying to implement this code:
更新2:我正在尝试实现此代码:
AWSCognito.config.region = 'us-east-1';
var poolData = {
UserPoolId : '...', // your user pool id here
ClientId : '...' // your app client id here
};
var userPool =
new AWSCognito.CognitoIdentityServiceProvider.CognitoUserPool(poolData);
var userData = {
Username : '...', // your username here
Pool : userPool
};
1 个解决方案
#1
1
I looked in the npm and I find it npmjs,
我看了npm,发现它是npmjs,
you can install it :
你可以安装它:
npm install @types/aws-sdk
#1
1
I looked in the npm and I find it npmjs,
我看了npm,发现它是npmjs,
you can install it :
你可以安装它:
npm install @types/aws-sdk