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:
Félix Malfait
2025-08-08 01:27:05 +02:00
committed by GitHub
parent 525c8bfe3c
commit 8b4b9ef8da
2050 changed files with 5124 additions and 4912 deletions
@@ -1,4 +1,4 @@
import { ExecutionContext } from '@nestjs/common';
import { type ExecutionContext } from '@nestjs/common';
import { GqlExecutionContext } from '@nestjs/graphql';
import { AdminPanelGuard } from 'src/engine/guards/admin-panel-guard';
@@ -1,4 +1,4 @@
import { ExecutionContext } from '@nestjs/common';
import { type ExecutionContext } from '@nestjs/common';
import { GqlExecutionContext } from '@nestjs/graphql';
import { ImpersonateGuard } from 'src/engine/guards/impersonate-guard';
@@ -1,5 +1,5 @@
import { ExecutionContext } from '@nestjs/common';
import { Test, TestingModule } from '@nestjs/testing';
import { type ExecutionContext } from '@nestjs/common';
import { Test, type TestingModule } from '@nestjs/testing';
import { PublicEndpointGuard } from 'src/engine/guards/public-endpoint.guard';
@@ -1,7 +1,7 @@
import { CanActivate, ExecutionContext } from '@nestjs/common';
import { type CanActivate, type ExecutionContext } from '@nestjs/common';
import { GqlExecutionContext } from '@nestjs/graphql';
import { Observable } from 'rxjs';
import { type Observable } from 'rxjs';
export class AdminPanelGuard implements CanActivate {
canActivate(
@@ -1,8 +1,12 @@
import { CanActivate, ExecutionContext, Injectable } from '@nestjs/common';
import {
type CanActivate,
type ExecutionContext,
Injectable,
} from '@nestjs/common';
import { Reflector } from '@nestjs/core';
import { GqlExecutionContext } from '@nestjs/graphql';
import { FeatureFlagKey } from 'src/engine/core-modules/feature-flag/enums/feature-flag-key.enum';
import { type FeatureFlagKey } from 'src/engine/core-modules/feature-flag/enums/feature-flag-key.enum';
import { FeatureFlagService } from 'src/engine/core-modules/feature-flag/services/feature-flag.service';
import { TypedReflect } from 'src/utils/typed-reflect';
@@ -1,7 +1,7 @@
import { CanActivate, ExecutionContext } from '@nestjs/common';
import { type CanActivate, type ExecutionContext } from '@nestjs/common';
import { GqlExecutionContext } from '@nestjs/graphql';
import { Observable } from 'rxjs';
import { type Observable } from 'rxjs';
export class ImpersonateGuard implements CanActivate {
canActivate(
@@ -1,4 +1,8 @@
import { CanActivate, ExecutionContext, Injectable } from '@nestjs/common';
import {
type CanActivate,
type ExecutionContext,
Injectable,
} from '@nestjs/common';
import { AccessTokenService } from 'src/engine/core-modules/auth/token/services/access-token.service';
import { WorkspaceCacheStorageService } from 'src/engine/workspace-cache-storage/workspace-cache-storage.service';
@@ -1,4 +1,8 @@
import { CanActivate, ExecutionContext, Injectable } from '@nestjs/common';
import {
type CanActivate,
type ExecutionContext,
Injectable,
} from '@nestjs/common';
/**
* Guard that explicitly marks an endpoint as public/unprotected.
@@ -1,15 +1,15 @@
import {
CanActivate,
ExecutionContext,
type CanActivate,
type ExecutionContext,
Injectable,
mixin,
Type,
type Type,
} from '@nestjs/common';
import { GqlExecutionContext } from '@nestjs/graphql';
import { WorkspaceActivationStatus } from 'twenty-shared/workspace';
import { PermissionFlagType } from 'src/engine/metadata-modules/permissions/constants/permission-flag-type.constants';
import { type PermissionFlagType } from 'src/engine/metadata-modules/permissions/constants/permission-flag-type.constants';
import {
PermissionsException,
PermissionsExceptionCode,
@@ -1,7 +1,7 @@
import { CanActivate, ExecutionContext } from '@nestjs/common';
import { type CanActivate, type ExecutionContext } from '@nestjs/common';
import { GqlExecutionContext } from '@nestjs/graphql';
import { Observable } from 'rxjs';
import { type Observable } from 'rxjs';
export class UserAuthGuard implements CanActivate {
canActivate(
@@ -1,7 +1,7 @@
import { CanActivate, ExecutionContext } from '@nestjs/common';
import { type CanActivate, type ExecutionContext } from '@nestjs/common';
import { GqlExecutionContext } from '@nestjs/graphql';
import { Observable } from 'rxjs';
import { type Observable } from 'rxjs';
export class WorkspaceAuthGuard implements CanActivate {
canActivate(