Skip to content
New issue

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

typescript types #14

Open
ehartford opened this issue Jan 15, 2017 · 1 comment · May be fixed by #15
Open

typescript types #14

ehartford opened this issue Jan 15, 2017 · 1 comment · May be fixed by #15

Comments

@ehartford
Copy link

please, need typescript types for this

@ehartford
Copy link
Author

something like

declare namespace owaspPasswordStrengthTest {
  interface TestRet {
    errors : string[];
    failedTests : number[];
    passedTests : number[];
    requiredTestErrors : string[];
    optionalTestErrors : string[];
    isPassphrase : boolean;
    strong : boolean;
    optionalTestsPassed : number;
  }

  interface Config {
    allowPassphrases? : boolean;
    maxLength? : number;
    minLength? : number;
    minPhraseLength? : number;
    minOptionalTestsToPass? : number;
  }

  interface OwaspPasswordStrengthTest {
    config : (params : Config) => void;
    test : (password : string) => TestRet;
  }
}

declare const owaspPST : owaspPasswordStrengthTest.OwaspPasswordStrengthTest;
export = owaspPST;

@stephtr stephtr linked a pull request Feb 1, 2017 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant