We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
一、typings 中包含 Type Definitions 文件
1.使用 npm 安装依赖
npm
npm install bcryptjs --save
2.添加 Type Definitions 文件阻止编译器错误
Type Definitions
2.1 安装 typings
typings
npm install -g typings
2.2 安装 bcryptjs dt 文件
bcryptjs dt
typings install dt~bcryptjs --save --global
二、 typings 中不包含Type Definitions 文件
在 index.html 文件中引入对应的文件:
index.html
<script src="bcrypt.min.js"></script>
在使用的 ts 文件中声明变量:
ts
declare var dcodeIO: any; export class HomePage { public bcryptjs: any; public hash: string; constructor() { this.bcryptjs = dcodeIO.bcrypt; this.hash = this.bcryptjs.hashSync("nraboy", 8); } }
The text was updated successfully, but these errors were encountered:
No branches or pull requests
一、typings 中包含 Type Definitions 文件
1.使用
npm
安装依赖2.添加
Type Definitions
文件阻止编译器错误2.1 安装
typings
2.2 安装
bcryptjs dt
文件二、 typings 中不包含Type Definitions 文件
在
index.html
文件中引入对应的文件:在使用的
ts
文件中声明变量:The text was updated successfully, but these errors were encountered: