# Class ModuleFactory<TModule>

#### Type Parameters

- #### TModule extends Module

#### Hierarchy

- ModuleFactory

#### Implements

- CreatableModuleFactory<TModule>

- Defined in modules/packages/module/packages/abstract/dist/types/ModuleFactory.d.ts:6

#####
Index

### Constructors

constructor

### Properties

configSchema
creatableModule
defaultLogger?
defaultParams?

### Methods

create
factory
withParams

## Constructors

### constructor

- new ModuleFactory<TModule>(creatableModule, params?): ModuleFactory<TModule>

- #### Type Parameters

  - #### TModule extends ModuleFields<ModuleParams<SchemaFields & PayloadFields & {
    archivist?: ArchivistModuleConfig;
    name?: string;
    paging?: Record<string, {
    size?: number;
    }>;
    schema: string;
    security?: {
    allowAnonymous?: boolean;
    allowed?: Record<string, (string | CosigningAddressSet)[]>;
    disallowed?: Record<string, string[]>;
    };
    storeQueries?: boolean;
    } & Omit<Omit<SchemaFields & PayloadFields & {
    archivist?: ArchivistModuleConfig;
    name?: string;
    paging?: Record<string, {
    size?: number;
    }>;
    schema: "network.xyo.module.config";
    security?: {
    allowAnonymous?: boolean;
    allowed?: Record<string, (string | CosigningAddressSet)[]>;
    disallowed?: Record<string, string[]>;
    };
    storeQueries?: boolean;
    } & Omit<undefined, "schema">, "schema"> & {
    schema: string;
    }, "schema">, undefined>> & EventFunctions<ModuleEventData, TModule>

  #### Parameters

  - ##### creatableModule: CreatableModule<TModule>

  - ##### `Optional` params: TModule["params"]

  #### Returns ModuleFactory<TModule>

  - Defined in modules/packages/module/packages/abstract/dist/types/ModuleFactory.d.ts:11

## Properties

### configSchema

configSchema: string

Implementation of CreatableModuleFactory.configSchema

- Defined in modules/packages/module/packages/abstract/dist/types/ModuleFactory.d.ts:7

### creatableModule

creatableModule: CreatableModule<TModule>

- Defined in modules/packages/module/packages/abstract/dist/types/ModuleFactory.d.ts:8

### `Optional` defaultLogger

defaultLogger?: Logger

Implementation of CreatableModuleFactory.defaultLogger

- Defined in modules/packages/module/packages/abstract/dist/types/ModuleFactory.d.ts:9

### `Optional` defaultParams

defaultParams?: TModule["params"]

- Defined in modules/packages/module/packages/abstract/dist/types/ModuleFactory.d.ts:10

## Methods

### create

- create<T>(this, params?): Promise<T>

- #### Type Parameters

  - #### T extends ModuleFields<ModuleParams<SchemaFields & PayloadFields & {
    archivist?: ArchivistModuleConfig;
    name?: string;
    paging?: Record<string, {
    size?: number;
    }>;
    schema: string;
    security?: {
    allowAnonymous?: boolean;
    allowed?: Record<string, (string | CosigningAddressSet)[]>;
    disallowed?: Record<string, string[]>;
    };
    storeQueries?: boolean;
    } & Omit<Omit<SchemaFields & PayloadFields & {
    archivist?: ArchivistModuleConfig;
    name?: string;
    paging?: Record<string, {
    size?: number;
    }>;
    schema: "network.xyo.module.config";
    security?: {
    allowAnonymous?: boolean;
    allowed?: Record<string, (string | CosigningAddressSet)[]>;
    disallowed?: Record<string, string[]>;
    };
    storeQueries?: boolean;
    } & Omit<undefined, "schema">, "schema"> & {
    schema: string;
    }, "schema">, undefined>> & EventFunctions<ModuleEventData, T>

  #### Parameters

  - ##### this: CreatableModuleFactory<T>

  - ##### `Optional` params: TModule["params"]

  #### Returns Promise<T>

  Implementation of CreatableModuleFactory.create

  - Defined in modules/packages/module/packages/abstract/dist/types/ModuleFactory.d.ts:13

### factory

- factory<T>(this, _params?): CreatableModuleFactory<T>

- #### Type Parameters

  - #### T extends ModuleFields<ModuleParams<SchemaFields & PayloadFields & {
    archivist?: ArchivistModuleConfig;
    name?: string;
    paging?: Record<string, {
    size?: number;
    }>;
    schema: string;
    security?: {
    allowAnonymous?: boolean;
    allowed?: Record<string, (string | CosigningAddressSet)[]>;
    disallowed?: Record<string, string[]>;
    };
    storeQueries?: boolean;
    } & Omit<Omit<SchemaFields & PayloadFields & {
    archivist?: ArchivistModuleConfig;
    name?: string;
    paging?: Record<string, {
    size?: number;
    }>;
    schema: "network.xyo.module.config";
    security?: {
    allowAnonymous?: boolean;
    allowed?: Record<string, (string | CosigningAddressSet)[]>;
    disallowed?: Record<string, string[]>;
    };
    storeQueries?: boolean;
    } & Omit<undefined, "schema">, "schema"> & {
    schema: string;
    }, "schema">, undefined>> & EventFunctions<ModuleEventData, T>

  #### Parameters

  - ##### this: CreatableModule<T>

  - ##### `Optional` _params: T["params"]

  #### Returns CreatableModuleFactory<T>

  Implementation of CreatableModuleFactory.factory

  - Defined in modules/packages/module/packages/abstract/dist/types/ModuleFactory.d.ts:14

### `Static` withParams

- withParams<T>(creatableModule, params?): ModuleFactory<T>

- #### Type Parameters

  - #### T extends ModuleFields<ModuleParams<SchemaFields & PayloadFields & {
    archivist?: ArchivistModuleConfig;
    name?: string;
    paging?: Record<string, {
    size?: number;
    }>;
    schema: string;
    security?: {
    allowAnonymous?: boolean;
    allowed?: Record<string, (string | CosigningAddressSet)[]>;
    disallowed?: Record<string, string[]>;
    };
    storeQueries?: boolean;
    } & Omit<Omit<SchemaFields & PayloadFields & {
    archivist?: ArchivistModuleConfig;
    name?: string;
    paging?: Record<string, {
    size?: number;
    }>;
    schema: "network.xyo.module.config";
    security?: {
    allowAnonymous?: boolean;
    allowed?: Record<string, (string | CosigningAddressSet)[]>;
    disallowed?: Record<string, string[]>;
    };
    storeQueries?: boolean;
    } & Omit<undefined, "schema">, "schema"> & {
    schema: string;
    }, "schema">, undefined>> & EventFunctions<ModuleEventData, T>

  #### Parameters

  - ##### creatableModule: CreatableModule<T>

  - ##### `Optional` params: T["params"]

  #### Returns ModuleFactory<T>

  - Defined in modules/packages/module/packages/abstract/dist/types/ModuleFactory.d.ts:12

Generated using TypeDoc