<commit_before>import {UIHandler} from './core/UIHandler';
import {FormsHandler} from './core/FormsHandler';
import {RedirectHandler} from './core/RedirectHandler';
import {SnippetHandler} from './core/SnippetHandler';
import {HistoryHandler} from './core/HistoryHandler';
import {ScriptLoader} from './core/ScriptLoader';

export interface Options {
	fetch?: RequestInit;
	[key: string]: any;
}

export interface Payload {
	snippets?: { [id: string]: string };

	redirect?: string;

	postGet?: boolean;
	url?: string;

	[key: string]: any;
}

export declare class Naja extends EventTarget {
	public readonly uiHandler: UIHandler;
	public readonly redirectHandler: RedirectHandler;
	public readonly snippetHandler: SnippetHandler;
	public readonly formsHandler: FormsHandler;
	public readonly historyHandler: HistoryHandler;
	public readonly scriptLoader: ScriptLoader;

	public defaultOptions: Options;

	public constructor();

	public registerExtension(extension: Extension): void;

	public initialize(
		defaultOptions: Options,<commit_msg>Fixed initialize() type definition – optional parameter<commit_after>import {UIHandler} from './core/UIHandler';
import {FormsHandler} from './core/FormsHandler';
import {RedirectHandler} from './core/RedirectHandler';
import {SnippetHandler} from './core/SnippetHandler';
import {HistoryHandler} from './core/HistoryHandler';
import {ScriptLoader} from './core/ScriptLoader';

export interface Options {
	fetch?: RequestInit;
	[key: string]: any;
}

export interface Payload {
	snippets?: { [id: string]: string };

	redirect?: string;

	postGet?: boolean;
	url?: string;

	[key: string]: any;
}

export declare class Naja extends EventTarget {
	public readonly uiHandler: UIHandler;
	public readonly redirectHandler: RedirectHandler;
	public readonly snippetHandler: SnippetHandler;
	public readonly formsHandler: FormsHandler;
	public readonly historyHandler: HistoryHandler;
	public readonly scriptLoader: ScriptLoader;

	public defaultOptions: Options;

	public constructor();

	public registerExtension(extension: Extension): void;

	public initialize(
		defaultOptions?: Options,
{'fraction_non_alphanumeric': 0.10709253170502583, 'fraction_numerical': 0.0, 'mean_word_length': 6.220338983050848, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, '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': '565403', 'n_tokens_mistral': 572, 'n_tokens_neox': 549, 'n_words': 187}