Change type import rule (#13751)
Forcing "type" to be explicit, works best will rollup on the frontend to exclude depdendencies
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import { Injectable, NestMiddleware } from '@nestjs/common';
|
||||
import { Injectable, type NestMiddleware } from '@nestjs/common';
|
||||
|
||||
import { i18n } from '@lingui/core';
|
||||
import { NextFunction, Request, Response } from 'express';
|
||||
import { type NextFunction, type Request, type Response } from 'express';
|
||||
import { APP_LOCALES, SOURCE_LOCALE } from 'twenty-shared/translations';
|
||||
|
||||
// TODO: this should be deprecated as singleton pattern won't work: user will keep changing locales for eachothers
|
||||
|
||||
@@ -1,4 +1,9 @@
|
||||
import { Global, MiddlewareConsumer, Module, NestModule } from '@nestjs/common';
|
||||
import {
|
||||
Global,
|
||||
type MiddlewareConsumer,
|
||||
Module,
|
||||
type NestModule,
|
||||
} from '@nestjs/common';
|
||||
|
||||
import { I18nMiddleware } from 'src/engine/core-modules/i18n/i18n.middleware';
|
||||
import { I18nService } from 'src/engine/core-modules/i18n/i18n.service';
|
||||
|
||||
@@ -1,7 +1,13 @@
|
||||
import { Injectable, OnModuleInit } from '@nestjs/common';
|
||||
import { Injectable, type OnModuleInit } from '@nestjs/common';
|
||||
|
||||
import { I18n, MessageOptions, Messages, i18n, setupI18n } from '@lingui/core';
|
||||
import { APP_LOCALES, SOURCE_LOCALE } from 'twenty-shared/translations';
|
||||
import {
|
||||
type I18n,
|
||||
type MessageOptions,
|
||||
type Messages,
|
||||
i18n,
|
||||
setupI18n,
|
||||
} from '@lingui/core';
|
||||
import { type APP_LOCALES, SOURCE_LOCALE } from 'twenty-shared/translations';
|
||||
|
||||
import { messages as afMessages } from 'src/engine/core-modules/i18n/locales/generated/af-ZA';
|
||||
import { messages as arMessages } from 'src/engine/core-modules/i18n/locales/generated/ar-SA';
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { APP_LOCALES } from 'twenty-shared/translations';
|
||||
import { type APP_LOCALES } from 'twenty-shared/translations';
|
||||
export type I18nContext = {
|
||||
req: {
|
||||
locale: keyof typeof APP_LOCALES;
|
||||
|
||||
Reference in New Issue
Block a user