<commit_before>interface Creator<T> {
    new (...args): T;
}

declare module "aurelia-logging-console" {
    class ConsoleAppender implements AuAppender { }
}

declare module "aurelia-dependency-injection" {
    interface HandlerCallback {
        (container: Container): void;
    }

    class Container {
        get: <T>(key: any) => T;
        registerSingleton: <T>(key: any, fn?: Creator<T>) => void;
        registerTransient: <T>(key: any, fn?: Creator<T>) => void;
        registerInstance: (key: any, instance: any) => void;
        registerHandler: (key: any, callback: HandlerCallback) => void;
        supportAtScript: () => void;
        createChild: () => Container;
    }

    class Transient { }

    class Singleton { }

    class Resolver {
        get: (container: Container) => () => any;
    }

    class Lazy extends Resolver {
        constructor(key: any);
        static of: (key: any) => Lazy;
    }

    class All extends Resolver {
        constructor(key: any);
        static of: (key: any) => All;
    }

    class Optional extends Resolver {
        constructor(key: any);
        static of: (key: any, checkParent?: boolean) => Optional;
    }

    class Parent extends Resolver {
        constructor(key: any);
        get: (container: Container) => () => any;
        static of: (key: any) => Parent;
    }
}

declare module "aurelia-router" {
    import aureliadependencyinjection = require("aurelia-dependency-injection");
    import aureliahistory = require("aurelia-history");

    interface IRoute {
        // todo: update "route" to union type (string | Array<string>) when union types are mainstream
        route: any;
        moduleId: string;
        nav: boolean;
        title?: string;
    }

    interface IRouterConfig {
        title: string;
        map: (routeArray: Array<IRoute>) => void;
    }

    class Router {
        configure: (callback: (config: IRouterConfig) => void) => void;
        navigate(fragment: string, options: boolean);
        navigateBack();
        refreshNavigation();
    }

    interface INavigationCommand {
        navigate(appRouter)
    }

    class Redirect implements INavigationCommand {
        constructor(url: string);
        navigate(appRouter)
    }

    class AppRouter {
        baseUrl: string;
        childRecognizer: any;
        container: aureliadependencyinjection.Container;
        currentInstruction: any; // todo: NavigationInstruction
        fallbackOrder: number;
        history: aureliahistory.History;
        isActive: boolean;
        isNavigating: boolean;
        options: any;
        pipelineProvider: any;
        queue: any[];
        recognizer: any;// todo: RouteRecognizer
        routes: any[];
        title: string;
        viewPorts: any;
    }
}

declare module "aurelia-history" {
    class History {
        active: boolean;
        fragment: string;
        history: History;
        interval: number;
        location: any; // todo: Location
        options: any;
        previousFragment: string;
        root: string;
    }
}

declare module "aurelia-event-aggregator" {
    class EventAggregator {
        publish(event: string, data: any);
        subscribe(event: string, callback: Function);
    }
}

interface IPromise<T> {
    then: (callback: (response: T) => void) => void;
}

declare module "aurelia-http-client" {
    interface IJsonpContent {
        items: Array<Object>;
    }

    interface IJsonpResponse {
        content: IJsonpContent;
    }

    class HttpClient {
        jsonp: (url: string) => IPromise<IJsonpResponse>;
    }
}

interface AuAppender { }

declare module "aurelia-framework" {
    class Behavior {
        static withProperty(propertyName: string);
    }

    interface Loader { }
    interface AureliaPlugins {
        installBindingLanguage: () => AureliaPlugins;<commit_msg>aurelia.d.ts updates for router and behavior<commit_after>interface Creator<T> {
    new (...args): T;
}

declare module "aurelia-logging-console" {
    class ConsoleAppender implements AuAppender { }
}

declare module "aurelia-dependency-injection" {
    interface HandlerCallback {
        (container: Container): void;
    }

    class Container {
        get: <T>(key: any) => T;
        registerSingleton: <T>(key: any, fn?: Creator<T>) => void;
        registerTransient: <T>(key: any, fn?: Creator<T>) => void;
        registerInstance: (key: any, instance: any) => void;
        registerHandler: (key: any, callback: HandlerCallback) => void;
        supportAtScript: () => void;
        createChild: () => Container;
    }

    class Transient { }

    class Singleton { }

    class Resolver {
        get: (container: Container) => () => any;
    }

    class Lazy extends Resolver {
        constructor(key: any);
        static of: (key: any) => Lazy;
    }

    class All extends Resolver {
        constructor(key: any);
        static of: (key: any) => All;
    }

    class Optional extends Resolver {
        constructor(key: any);
        static of: (key: any, checkParent?: boolean) => Optional;
    }

    class Parent extends Resolver {
        constructor(key: any);
        get: (container: Container) => () => any;
        static of: (key: any) => Parent;
    }
}

declare module "aurelia-router" {
    import aureliadependencyinjection = require("aurelia-dependency-injection");
    import aureliahistory = require("aurelia-history");

    interface IRoute {
        // todo: update "route" to union type (string | Array<string>) when union types are mainstream
        route: any;
        moduleId: string;
        nav: boolean;
        title?: string;
        settings?: any;
    }

    interface IRouterConfig {
        title: string;
        map: (routeArray: Array<IRoute>) => void;
    }

    class Router {
        isNavigating: boolean;
        navigation: Array<IRoute>;

        configure: (callback: (config: IRouterConfig) => void) => void;
        navigate(fragment: string, options: boolean);
        navigateBack();
        refreshNavigation();
        addRoute(config: IRoute);
        reset();
    }

    interface INavigationCommand {
        navigate(appRouter)
    }

    class Redirect implements INavigationCommand {
        constructor(url: string);
        navigate(appRouter)
    }

    class AppRouter {
        baseUrl: string;
        childRecognizer: any;
        container: aureliadependencyinjection.Container;
        currentInstruction: any; // todo: NavigationInstruction
        fallbackOrder: number;
        history: aureliahistory.History;
        isActive: boolean;
        isNavigating: boolean;
        options: any;
        pipelineProvider: any;
        queue: any[];
        recognizer: any;// todo: RouteRecognizer
        routes: any[];
        title: string;
        viewPorts: any;
    }
}

declare module "aurelia-history" {
    class History {
        active: boolean;
        fragment: string;
        history: History;
        interval: number;
        location: any; // todo: Location
        options: any;
        previousFragment: string;
        root: string;
    }
}

declare module "aurelia-event-aggregator" {
    class EventAggregator {
        publish(event: string, data: any);
        subscribe(event: string, callback: Function);
    }
}

interface IPromise<T> {
    then: (callback: (response: T) => void) => void;
}

declare module "aurelia-http-client" {
    interface IJsonpContent {
        items: Array<Object>;
    }

    interface IJsonpResponse {
        content: IJsonpContent;
    }

    class HttpClient {
        jsonp: (url: string) => IPromise<IJsonpResponse>;
    }
}

interface AuAppender { }

declare module "aurelia-framework" {
    class Behavior {
        static withProperty(propertyName: string): Behavior;
        static withOptions(attribute): Behavior;
        static attachedBehavior(attribute): Behavior;
        static syncChildren(property, changeHandler, selector): Behavior;
        static customElement(tagName: string): Behavior;
        static useShadowDOM(): Behavior;
        static elementConfig(): Behavior;
        static templateController(attribute): Behavior;
        static useView(path: string): Behavior;
        static noView(): Behavior;

        withProperty(propertyName: string): Behavior;
        withOptions(attribute): Behavior;
        attachedBehavior(attribute): Behavior;
        syncChildren(property, changeHandler, selector): Behavior;
        customElement(tagName: string): Behavior;
        useShadowDOM(): Behavior;
        elementConfig(): Behavior;
        templateController(attribute): Behavior;
        useView(path: string): Behavior;
        noView(): Behavior;
    }

    interface Loader { }
    interface AureliaPlugins {
        installBindingLanguage: () => AureliaPlugins;
{'fraction_non_alphanumeric': 0.11031502331399977, 'fraction_numerical': 0.0, 'mean_word_length': 2.4896825396825397, 'pattern_counts': {'":': 0, '<': 26, '<?xml version=': 0, '>': 70, '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': '7151373', 'n_tokens_mistral': 2505, 'n_tokens_neox': 2419, 'n_words': 652}