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,4 +1,4 @@
|
||||
import { EachTestingContext } from '@/testing/types/EachTestingContext.type';
|
||||
import { type EachTestingContext } from '@/testing/types/EachTestingContext.type';
|
||||
|
||||
export const eachTestingContextFilter = <T>(
|
||||
testCases: EachTestingContext<T>[],
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { EachTestingContext } from '@/testing/types/EachTestingContext.type';
|
||||
import { type EachTestingContext } from '@/testing/types/EachTestingContext.type';
|
||||
|
||||
export type SuccessfulAndFailingTestCases<T> = {
|
||||
successful: EachTestingContext<T>[];
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { FieldMetadataType } from './FieldMetadataType';
|
||||
import { type FieldMetadataType } from './FieldMetadataType';
|
||||
|
||||
export type EnumFieldMetadataType =
|
||||
| FieldMetadataType.RATING
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { RestrictedFieldsPermissions } from './RestrictedFieldsPermissions';
|
||||
import { type RestrictedFieldsPermissions } from './RestrictedFieldsPermissions';
|
||||
|
||||
export type ObjectPermissions = {
|
||||
canReadObjectRecords: boolean;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { RestrictedFieldsPermissions } from './RestrictedFieldsPermissions';
|
||||
import { type RestrictedFieldsPermissions } from './RestrictedFieldsPermissions';
|
||||
|
||||
// TODO: DEPRECATE THIS
|
||||
export type ObjectPermissionsDeprecated = {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { ObjectPermissions } from './ObjectPermissions';
|
||||
import { type ObjectPermissions } from './ObjectPermissions';
|
||||
|
||||
type ObjectMetadataId = string;
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { ObjectsPermissions } from './ObjectsPermissions';
|
||||
import { type ObjectsPermissions } from './ObjectsPermissions';
|
||||
|
||||
type RoleId = string;
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { ObjectsPermissionsDeprecated } from './ObjectsPermissionsDeprecated';
|
||||
import { type ObjectsPermissionsDeprecated } from './ObjectsPermissionsDeprecated';
|
||||
|
||||
type RoleId = string;
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { ObjectPermissionsDeprecated } from './ObjectPermissionsDeprecated';
|
||||
import { type ObjectPermissionsDeprecated } from './ObjectPermissionsDeprecated';
|
||||
|
||||
type ObjectMetadataId = string;
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { FieldMetadataType } from './FieldMetadataType';
|
||||
import { type FieldMetadataType } from './FieldMetadataType';
|
||||
|
||||
export type RelationAndMorphRelationFieldMetadataType =
|
||||
| FieldMetadataType.RELATION
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { RestrictedFieldPermissions } from './RestrictedFieldPermissions';
|
||||
import { type RestrictedFieldPermissions } from './RestrictedFieldPermissions';
|
||||
|
||||
export type RestrictedFieldsPermissions = Record<
|
||||
string,
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { ViewFilterOperand } from './ViewFilterOperand';
|
||||
import { type ViewFilterOperand } from './ViewFilterOperand';
|
||||
|
||||
export enum StepLogicalOperator {
|
||||
AND = 'AND',
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { EachTestingContext } from '@/testing/types/EachTestingContext.type';
|
||||
import { type EachTestingContext } from '@/testing/types/EachTestingContext.type';
|
||||
import { deepMerge } from '@/utils';
|
||||
|
||||
type DeepMergeTestCase<T extends object> = {
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
import { EachTestingContext } from '@/testing/types/EachTestingContext.type';
|
||||
import { type EachTestingContext } from '@/testing/types/EachTestingContext.type';
|
||||
import { fromArrayToUniqueKeyRecord } from '@/utils/from-array-to-unique-key-record.util';
|
||||
|
||||
type FromArrayToUniqueKeyRecordTestCase = EachTestingContext<{
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { eachTestingContextFilter } from '@/testing';
|
||||
import { EachTestingContext } from '@/testing/types/EachTestingContext.type';
|
||||
import { type EachTestingContext } from '@/testing/types/EachTestingContext.type';
|
||||
import { extractAndSanitizeObjectStringFields } from '../extractAndSanitizeObjectStringFields';
|
||||
|
||||
type TestObject = {
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
import { eachTestingContextFilter } from '@/testing';
|
||||
import { EachTestingContext } from '@/testing/types/EachTestingContext.type';
|
||||
import { type EachTestingContext } from '@/testing/types/EachTestingContext.type';
|
||||
import { trimAndRemoveDuplicatedWhitespacesFromObjectStringProperties } from '../trim-and-remove-duplicated-whitespaces-from-object-string-properties';
|
||||
type SanitizeObjectStringPropertiesTestCase = EachTestingContext<{
|
||||
input: Record<string, any>;
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
import { EachTestingContext } from '@/testing/types/EachTestingContext.type';
|
||||
import { type EachTestingContext } from '@/testing/types/EachTestingContext.type';
|
||||
import { trimAndRemoveDuplicatedWhitespacesFromString } from '../trim-and-remove-duplicated-whitespaces-from-string';
|
||||
|
||||
type TrimAndRemoveWhitespacesTestCase = EachTestingContext<{
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { StringPropertyKeys } from '@/utils/trim-and-remove-duplicated-whitespaces-from-object-string-properties';
|
||||
import { type StringPropertyKeys } from '@/utils/trim-and-remove-duplicated-whitespaces-from-object-string-properties';
|
||||
import { isDefined } from '@/utils/validation';
|
||||
|
||||
export const fromArrayToUniqueKeyRecord = <T extends object>({
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { StringPropertyKeys } from '@/utils/trim-and-remove-duplicated-whitespaces-from-object-string-properties';
|
||||
import { type StringPropertyKeys } from '@/utils/trim-and-remove-duplicated-whitespaces-from-object-string-properties';
|
||||
import { isDefined } from '@/utils/validation';
|
||||
|
||||
export const fromArrayToValuesByKeyRecord = <T extends object>({
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { LABEL_IDENTIFIER_FIELD_METADATA_TYPES } from '@/constants/LabelIdentifierFieldMetadataTypes';
|
||||
import { FieldMetadataType } from '@/types';
|
||||
import { type FieldMetadataType } from '@/types';
|
||||
|
||||
export const isLabelIdentifierFieldMetadataTypes = (
|
||||
value: FieldMetadataType,
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { CountryCode, getCountries } from 'libphonenumber-js';
|
||||
import { type CountryCode, getCountries } from 'libphonenumber-js';
|
||||
|
||||
const ALL_COUNTRIES_CODE = getCountries();
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { getWorkflowRunContext } from '@/workflow/utils/getWorkflowRunContext';
|
||||
import {
|
||||
StepStatus,
|
||||
WorkflowRunStepInfos,
|
||||
type WorkflowRunStepInfos,
|
||||
} from '@/workflow/types/WorkflowRunStateStepInfos';
|
||||
|
||||
describe('getWorkflowRunContext', () => {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { isDefined } from '@/utils';
|
||||
import { WorkflowRunStepInfos } from '@/workflow/types/WorkflowRunStateStepInfos';
|
||||
import { type WorkflowRunStepInfos } from '@/workflow/types/WorkflowRunStateStepInfos';
|
||||
|
||||
export const getWorkflowRunContext = (
|
||||
stepInfos: WorkflowRunStepInfos,
|
||||
|
||||
Reference in New Issue
Block a user