<commit_before>declare module "innerject" {
    type ClassType<T> = { new(...args): T }
    type KeyType<T> = string | symbol | ClassType<T> | T;
    type ValueType<T> = T|ClassType<T>|Factory<T>;
    type Factory<T> = (...args: any[]) => T;
    type RegistryType = 'class'|'instance'|'factory'|'instanceFactory';
    type FunctionType<T> = (...args: any[]) => T;
    type Resolver = (key: string, ...args: any[]) => any;
    type MapArgsHandler = (resolve: Resolver, ...args: any[]) => any[];

    export class Registry {
        public static defaultRegistry: Registry;
        public has(key: string): boolean;
        public unregister(key: string): void;
        public reset(): void;
        public registerClass<T=unknown>(key: KeyType<T>, Class: ClassType<T>): void;
        public registerInstance<T=unknown>(key: KeyType<T>, instance: T): void;
        public registerFactory<T=unknown>(key: KeyType<T>, factory: Factory<T>): void;
        public registerInstanceFactory<T=unknown>(key: KeyType<T>, factory: Factory<T>): void;
        public register<T=unknown>(type: RegistryType, key: KeyType<T>, object: ValueType<T>);
        public resolve<T=unknown>(key: KeyType<T>, ...args: any[]): T;1
        private _getRegistryItem<T=unknown>(key: KeyType<T>): ValueType<T>;
        private _getFactoryInstance<T=unknown>(key: KeyType<T>): T;
        private _resolve<T=unknown>(key: KeyType<T>, ...args: any[]);
    }

    export function innerject<T=unknown>(mapArgs: MapArgsHandler, resolve?: Resolver): (Class: ClassType<T>) => ClassType<T>;
    export function innerjectFunc<T=unknown>(mapArgs: MapArgsHandler, resolve?: Resolver): (Class: ClassType<T>) => (fn: FunctionType<T>) => FunctionType<T>;
    export function combinedRegistryResolve(...resolvers: Resolver[]): Resolver;
    export const defaultRegistry: Registry;
}<commit_msg>slightly adjusted type defs<commit_after>declare module "innerject" {
    export type ClassType<T> = { new(...args): T }
    export type KeyType<T> = string | symbol | ClassType<T> | T;
    export type ValueType<T> = T|ClassType<T>|Factory<T>;
    export type Factory<T> = (...args: any[]) => T;
    export type RegistryType = 'class'|'instance'|'factory'|'instanceFactory';
    export type FunctionType<T> = (...args: any[]) => T;
    export type Resolver = (key: string, ...args: any[]) => any;
    export type MapArgsHandler = (resolve: Resolver, ...args: any[]) => any[];

    export interface IRegistry {
        has(key: string): boolean;
        unregister(key: string): void;
        reset(): void;
        registerClass<T=unknown>(key: KeyType<T>, Class: ClassType<T>): void;
        registerInstance<T=unknown>(key: KeyType<T>, instance: T): void;
        registerFactory<T=unknown>(key: KeyType<T>, factory: Factory<T>): void;
        registerInstanceFactory<T=unknown>(key: KeyType<T>, factory: Factory<T>): void;
        register<T=unknown>(type: RegistryType, key: KeyType<T>, object: ValueType<T>);
        resolve<T=unknown>(key: KeyType<T>, ...args: any[]): T;
    }

    export class Registry implements IRegistry {
        static defaultRegistry: IRegistry;
        public has(key: string): boolean;
        public unregister(key: string): void;
        public reset(): void;
        public registerClass<T=unknown>(key: KeyType<T>, Class: ClassType<T>): void;
        public registerInstance<T=unknown>(key: KeyType<T>, instance: T): void;
        public registerFactory<T=unknown>(key: KeyType<T>, factory: Factory<T>): void;
        public registerInstanceFactory<T=unknown>(key: KeyType<T>, factory: Factory<T>): void;
        public register<T=unknown>(type: RegistryType, key: KeyType<T>, object: ValueType<T>);
        public resolve<T=unknown>(key: KeyType<T>, ...args: any[]): T;
        private _getRegistryItem<T=unknown>(key: KeyType<T>): ValueType<T>;
        private _getFactoryInstance<T=unknown>(key: KeyType<T>): T;
        private _resolve<T=unknown>(key: KeyType<T>, ...args: any[]);
    }

    export function innerject<T=unknown>(mapArgs: MapArgsHandler, resolve?: Resolver): (Class: ClassType<T>) => ClassType<T>;
    export function innerjectFunc<T=unknown>(mapArgs: MapArgsHandler, resolve?: Resolver): (Class: ClassType<T>) => (fn: FunctionType<T>) => FunctionType<T>;
    export function combinedRegistryResolve(...resolvers: Resolver[]): Resolver;
    export const defaultRegistry: Registry;
}
{'fraction_non_alphanumeric': 0.16415868673050615, 'fraction_numerical': 0.00022799817601459188, 'mean_word_length': 4.228843861740167, 'pattern_counts': {'":': 0, '<': 95, '<?xml version=': 0, '>': 109, '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': '6130688', 'n_tokens_mistral': 1343, 'n_tokens_neox': 1327, 'n_words': 334}