<commit_before>// Type definitions for Sortable.js 1.3
// Project: https://github.com/RubaXa/Sortable
// Definitions by: Maw-Fox <https://github.com/Maw-Fox>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped

import Sortable = Sortablejs.Sortable;
export = Sortable;
export as namespace Sortable;

declare namespace Sortablejs {
    interface SortableOptions {
        group?: any;
        sort?: boolean;
        delay?: number;
        disabled?: boolean;
        store?: {
            get: (sortable: Sortable) => any[];
            set: (sortable: Sortable) => any;
        };
        animation?: number;
        handle?: string;
        filter?: any;
        draggable?: string;
        ghostClass?: string;
        chosenClass?: string;
        dataIdAttr?: string;
        forceFallback?: boolean;
        fallbackClass?: string;
        fallbackOnBody?: boolean;
        scroll?: boolean;
        scrollSensitivity?: number;
        scrollSpeed?: number;
        setData?: (dataTransfer: any, draggedElement: any) => any;
        onStart?: (event: any) => any;
        onEnd?: (event: any) => any;
        onAdd?: (event: any) => any;
        onUpdate?: (event: any) => any;
        onSort?: (event: any) => any;
        onRemove?: (event: any) => any;
        onFilter?: (event: any) => any;
        onMove?: (event: any) => boolean;
    }

    interface SortableUtils {
        /**
         * Attach an event handler function
         * @param {HTMLElement} element an HTMLElement.
         * @param {string} event an Event context.
         * @param {Function} fn
         */
        on(element: any, event: string, fn: (event: any) => any): void;

        /**
         * Remove an event handler function
         * @param {HTMLElement} element an HTMLElement.
         * @param {string} event an Event context.
         * @param {Function} fn a callback.
         */
        off(element: any, event: string, fn: (event: any) => any): void;<commit_msg>Sortablejs: Better typings for event handlers.<commit_after>// Type definitions for Sortable.js 1.3
// Project: https://github.com/RubaXa/Sortable
// Definitions by: Maw-Fox <https://github.com/Maw-Fox>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped

import Sortable = Sortablejs.Sortable;
export = Sortable;
export as namespace Sortable;

declare namespace Sortablejs {
    interface SortableEvent extends ExtendableEventInit {
        clone: HTMLElement;
        from: HTMLElement;
        item: HTMLElement;
        newIndex: number | undefined;
        oldIndex: number | undefined;
        to: HTMLElement;
    }

    interface SortableMoveEvent extends ExtendableEventInit {
        dragged: HTMLElement;
        draggedRect: DOMRect;
        from: HTMLElement;
        related: HTMLElement;
        relatedRect: DOMRect;
        to: HTMLElement;
        willInsertAfter?: boolean;
    }

    interface SortableOptions {
        group?: any;
        sort?: boolean;
        delay?: number;
        disabled?: boolean;
        store?: {
            get: (sortable: Sortable) => any[];
            set: (sortable: Sortable) => any;
        };
        animation?: number;
        handle?: string;
        filter?: any;
        draggable?: string;
        ghostClass?: string;
        chosenClass?: string;
        dataIdAttr?: string;
        forceFallback?: boolean;
        fallbackClass?: string;
        fallbackOnBody?: boolean;
        scroll?: boolean;
        scrollSensitivity?: number;
        scrollSpeed?: number;
        setData?: (dataTransfer: any, draggedElement: any) => any;
        onStart?: (event: SortableEvent) => void;
        onEnd?: (event: SortableEvent) => void;
        onAdd?: (event: SortableEvent) => void;
        onUpdate?: (event: SortableEvent) => void;
        onSort?: (event: SortableEvent) => void;
        onRemove?: (event: SortableEvent) => void;
        onFilter?: (event: SortableEvent) => void;
        onMove?: (event: SortableMoveEvent) => boolean;
    }

    interface SortableUtils {
        /**
         * Attach an event handler function
         * @param {HTMLElement} element an HTMLElement.
         * @param {string} event an Event context.
         * @param {Function} fn
         */
        on(element: any, event: string, fn: (event: any) => any): void;

        /**
         * Remove an event handler function
         * @param {HTMLElement} element an HTMLElement.
         * @param {string} event an Event context.
         * @param {Function} fn a callback.
         */
        off(element: any, event: string, fn: (event: any) => any): void;
{'fraction_non_alphanumeric': 0.1213107638888889, 'fraction_numerical': 0.0008680555555555555, 'mean_word_length': 2.2389318341531976, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 31, 'https://': 6, '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': '4199274', 'n_tokens_mistral': 1303, 'n_tokens_neox': 1312, 'n_words': 378}