<commit_before>// Arda, also known as the Earth, was the world in which Elves, Men, Dwarves, and Hobbits live.
// ref. http://lotr.wikia.com/wiki/Arda
declare module Arda {
  export class Router {
    // mount on element with layout component
    // example.
    //    new Arda.Router(Arda.DefaultLayout, document.body);
    constructor(layout: typeof Component, el: HTMLElement);

    // history push with promise
    // example.
    //    var router = new Arda.Router(Arda.DefaultLayout, document.body);
    pushContext(context: typeof Context, args?: any): Thenable<Context<any, any, any>>;

    // history push and wait next context's finish
    pushContextAndWaitForBack(context: typeof Context, args?: any): Thenable<Context<any, any, any>>;

    // historay replace with promise
    replaceContext(context: typeof Context, args?: any): Thenable<Context<any, any, any>>;

    // historay pop with promise
    popContext(): Thenable<Context<any, any, any>>;
  }

  // Arda.Component extends React.Component
  export class Component<TemplateProps, InternalState> {
    refs: any;
    props: TemplateProps;
    state: InternalState;
    dispatch: (eventName: string, ...args: any[]) => boolean;
  }

  // Arda.Component extends React.Component
  export class DefaultLayout<TemplateProps> extends Component<{}, {
    // Top context on history
    activeContext: Context<any, any, TemplateProps>;
    // last template props
    templateProps: TemplateProps;
  }> {}
<commit_msg>Add mixin reference for typescript<commit_after>// Arda, also known as the Earth, was the world in which Elves, Men, Dwarves, and Hobbits live.
// ref. http://lotr.wikia.com/wiki/Arda
declare module Arda {
  export class Router {
    // mount on element with layout component
    // example.
    //    new Arda.Router(Arda.DefaultLayout, document.body);
    constructor(layout: typeof Component, el: HTMLElement);

    // history push with promise
    // example.
    //    var router = new Arda.Router(Arda.DefaultLayout, document.body);
    pushContext(context: typeof Context, args?: any): Thenable<Context<any, any, any>>;

    // history push and wait next context's finish
    pushContextAndWaitForBack(context: typeof Context, args?: any): Thenable<Context<any, any, any>>;

    // historay replace with promise
    replaceContext(context: typeof Context, args?: any): Thenable<Context<any, any, any>>;

    // historay pop with promise
    popContext(): Thenable<Context<any, any, any>>;
  }

  export var mixin: {
    dispatch: (eventName: string, ...args: any[]) => boolean;
  };

  // Arda.Component extends React.Component
  export class Component<TemplateProps, InternalState> {
    refs: any;
    props: TemplateProps;
    state: InternalState;
    dispatch: (eventName: string, ...args: any[]) => boolean;
  }

  // Arda.Component extends React.Component
  export class DefaultLayout<TemplateProps> extends Component<{}, {
    // Top context on history
    activeContext: Context<any, any, TemplateProps>;
    // last template props
    templateProps: TemplateProps;
  }> {}

{'fraction_non_alphanumeric': 0.11925708699902249, 'fraction_numerical': 0.0, 'mean_word_length': 3.494875549048316, 'pattern_counts': {'":': 0, '<': 27, '<?xml version=': 0, '>': 30, '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': '697278', 'n_tokens_mistral': 881, 'n_tokens_neox': 861, 'n_words': 281}