<commit_before>/// <reference types="express" />

/**
 * Created by <NAME> <https://github.com/linusbrolin/>.
 */

import {
    Schema,
    model,
    Document,
    PassportLocalDocument,
    PassportLocalSchema,
    PassportLocalModel,
    PassportLocalOptions,
    PassportLocalErrorMessages
} from 'mongoose';
import * as passportLocalMongoose from 'passport-local-mongoose';

import { Router, Request, Response } from 'express';
import * as passport from 'passport';
import { Strategy as LocalStrategy } from 'passport-local';


//#region Test Models
interface User extends PassportLocalDocument {
    _id: string;
    username: string;
    hash: string;
    salt: string;
    attempts: number;
    last: Date;
}

const UserSchema: PassportLocalSchema = new Schema({
    username: String,
    hash: String,
    salt: String,
    attempts: Number,
    last: Date
});

let options: PassportLocalOptions = <PassportLocalOptions>{};
options.iterations = 25000;
options.keylen = 512;
options.digestAlgorithm = 'sha256';<commit_msg>passport-local-mongoose: Fix error in typescript@next (#17058)<commit_after>/// <reference types="express" />

/**
 * Created by <NAME> <https://github.com/linusbrolin/>.
 */

import {
    Schema,
    model,
    Document,
    PassportLocalDocument,
    PassportLocalSchema,
    PassportLocalModel,
    PassportLocalOptions,
    PassportLocalErrorMessages
} from 'mongoose';
import * as passportLocalMongoose from 'passport-local-mongoose';

import { Router, Request, Response } from 'express';
import * as passport from 'passport';
import { Strategy as LocalStrategy } from 'passport-local';


//#region Test Models
interface User extends PassportLocalDocument {
    _id: string;
    username: string;
    hash: string;
    salt: string;
    attempts: number;
    last: Date;
}

const UserSchema = new Schema({
    username: String,
    hash: String,
    salt: String,
    attempts: Number,
    last: Date
}) as PassportLocalSchema;

let options: PassportLocalOptions = <PassportLocalOptions>{};
options.iterations = 25000;
options.keylen = 512;
options.digestAlgorithm = 'sha256';
{'fraction_non_alphanumeric': 0.11179535765040265, 'fraction_numerical': 0.012790146849834202, 'mean_word_length': 3.969411764705882, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 11, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2891276', 'n_tokens_mistral': 658, 'n_tokens_neox': 631, 'n_words': 173}