mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-08-16 15:00:26 +00:00
Add joi-password-complexity type definitions (#37724)
* Add joi-password-complexity type definitions * Remove tslint rules
This commit is contained in:
committed by
Sheetal Nandi
parent
70b782ba42
commit
b4ee5a63aa
+24
@@ -0,0 +1,24 @@
|
||||
// Type definitions for joi-password-complexity 3.1
|
||||
// Project: https://github.com/kamronbatman/joi-password-complexity
|
||||
// Definitions by: Nico Flaig <https://github.com/nflaig>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
// TypeScript Version: 3.5
|
||||
|
||||
// tslint:disable-next-line:no-unnecessary-class
|
||||
declare class PasswordComplexity {
|
||||
constructor(options?: PasswordComplexity.ComplexityOptions);
|
||||
}
|
||||
|
||||
declare namespace PasswordComplexity {
|
||||
interface ComplexityOptions {
|
||||
min: number;
|
||||
max: number;
|
||||
lowerCase: number;
|
||||
upperCase: number;
|
||||
numeric: number;
|
||||
symbol: number;
|
||||
requirementCount: number;
|
||||
}
|
||||
}
|
||||
|
||||
export = PasswordComplexity;
|
||||
@@ -0,0 +1,13 @@
|
||||
import PasswordComplexity = require("joi-password-complexity");
|
||||
|
||||
const complexityOptions: PasswordComplexity.ComplexityOptions = {
|
||||
min: 8,
|
||||
max: 30,
|
||||
lowerCase: 1,
|
||||
upperCase: 1,
|
||||
numeric: 1,
|
||||
symbol: 1,
|
||||
requirementCount: 3
|
||||
};
|
||||
|
||||
const passwordComplexity = new PasswordComplexity(complexityOptions);
|
||||
@@ -0,0 +1,23 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"module": "commonjs",
|
||||
"lib": [
|
||||
"es6"
|
||||
],
|
||||
"noImplicitAny": true,
|
||||
"noImplicitThis": true,
|
||||
"strictFunctionTypes": true,
|
||||
"strictNullChecks": true,
|
||||
"baseUrl": "../",
|
||||
"typeRoots": [
|
||||
"../"
|
||||
],
|
||||
"types": [],
|
||||
"noEmit": true,
|
||||
"forceConsistentCasingInFileNames": true
|
||||
},
|
||||
"files": [
|
||||
"index.d.ts",
|
||||
"joi-password-complexity-tests.ts"
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"extends": "dtslint/dt.json"
|
||||
}
|
||||
Reference in New Issue
Block a user