Skip to content

Instantly share code, notes, and snippets.

@maxchehab
Created July 16, 2019 21:17
Show Gist options
  • Save maxchehab/eb5cac89b73ab383adbb26d7babb8fb6 to your computer and use it in GitHub Desktop.
Save maxchehab/eb5cac89b73ab383adbb26d7babb8fb6 to your computer and use it in GitHub Desktop.
import { Type } from '@nestjs/common';
import { ModuleMetadata } from '@nestjs/common/interfaces';
export declare type I18nLoadingType = 'BY_LANGUAGE' | 'BY_DOMAIN';
export interface I18nOptions {
path: string;
fallbackLanguage?: string;
}
export interface I18nOptionsFactory {
createI18nOptions(): Promise<I18nOptions> | I18nOptions;
}
export interface I18nAsyncOptions extends Pick<ModuleMetadata, 'imports'> {
name?: string;
useExisting?: Type<I18nOptionsFactory>;
useClass?: Type<I18nOptionsFactory>;
useFactory?: (...args: any[]) => Promise<I18nOptions> | I18nOptions;
inject?: any[];
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment