diff --git a/build/lib/compendium-pack.ts b/build/lib/compendium-pack.ts index d23734726ea..046b857e7df 100644 --- a/build/lib/compendium-pack.ts +++ b/build/lib/compendium-pack.ts @@ -1,6 +1,7 @@ import type { ActorSourcePF2e } from "@actor/data/index.ts"; import { ItemSourcePF2e, MeleeSource, isPhysicalData } from "@item/data/index.ts"; import { FEAT_CATEGORIES } from "@item/feat/values.ts"; +import { itemIsOfType } from "@item/helpers.ts"; import { SIZES } from "@module/data.ts"; import { MigrationRunnerBase } from "@module/migration/runner/base.ts"; import { RuleElementSource } from "@module/rules/index.ts"; @@ -9,9 +10,8 @@ import fs from "fs"; import path from "path"; import coreIconsJSON from "../core-icons.json" assert { type: "json" }; import { PackError, getFilesRecursively } from "./helpers.ts"; -import { PackEntry } from "./types.ts"; import { DBFolder, LevelDatabase } from "./level-database.ts"; -import { itemIsOfType } from "@item/helpers.ts"; +import { PackEntry } from "./types.ts"; interface PackMetadata { system: string; @@ -480,4 +480,5 @@ interface ConvertUUIDOptions { map: Map>; } -export { CompendiumPack, PackError, PackMetadata, isItemSource, isActorSource, REMaybeWithUUIDs }; +export { CompendiumPack, PackError, isActorSource, isItemSource }; +export type { PackMetadata, REMaybeWithUUIDs }; diff --git a/build/lib/extractor.ts b/build/lib/extractor.ts index 9953b7f0d7f..0fd310575ad 100644 --- a/build/lib/extractor.ts +++ b/build/lib/extractor.ts @@ -866,4 +866,4 @@ class PackExtractor { } } -export { ExtractArgs, PackExtractor }; +export { type ExtractArgs, PackExtractor }; diff --git a/build/lib/level-database.ts b/build/lib/level-database.ts index b8ddb0fa680..5e5d2239063 100644 --- a/build/lib/level-database.ts +++ b/build/lib/level-database.ts @@ -171,4 +171,4 @@ interface LevelDatabaseOptions { dbOptions?: DatabaseOptions; } -export { DBFolder, LevelDatabase }; +export { type DBFolder, LevelDatabase }; diff --git a/build/lib/types.ts b/build/lib/types.ts index 89a02fa764b..9c909772c2a 100644 --- a/build/lib/types.ts +++ b/build/lib/types.ts @@ -5,4 +5,4 @@ import type { MacroPF2e } from "@module/macro.ts"; type CompendiumDocumentPF2e = ActorPF2e | ItemPF2e | JournalEntry | MacroPF2e | RollTable; type PackEntry = CompendiumDocumentPF2e["_source"]; -export { PackEntry }; +export type { PackEntry }; diff --git a/src/module/actor/actions/base.ts b/src/module/actor/actions/base.ts index 2f3868a9a7b..da734072fda 100644 --- a/src/module/actor/actions/base.ts +++ b/src/module/actor/actions/base.ts @@ -181,4 +181,5 @@ abstract class BaseAction): Promise; } -export { - ACTION_COST, - Action, - ActionCost, - ActionMessageOptions, - ActionUseOptions, - ActionVariant, - ActionVariantUseOptions, -}; +export type { Action, ActionCost, ActionMessageOptions, ActionUseOptions, ActionVariant, ActionVariantUseOptions }; diff --git a/src/module/actor/base.ts b/src/module/actor/base.ts index 994edf273b1..db37c310290 100644 --- a/src/module/actor/base.ts +++ b/src/module/actor/base.ts @@ -1961,4 +1961,5 @@ const ActorProxyPF2e = new Proxy(ActorPF2e, { }, }); -export { ActorPF2e, ActorProxyPF2e, ActorUpdateContext, HitPointsSummary }; +export { ActorPF2e, ActorProxyPF2e }; +export type { ActorUpdateContext, HitPointsSummary }; diff --git a/src/module/actor/character/attribute-builder.ts b/src/module/actor/character/attribute-builder.ts index 80c3dfa0d5e..bd8a81db2cf 100644 --- a/src/module/actor/character/attribute-builder.ts +++ b/src/module/actor/character/attribute-builder.ts @@ -562,4 +562,4 @@ interface LevelBoostData extends BoostFlawRow { minLevel: number; } -export { AttributeBuilder, BoostFlawState }; +export { AttributeBuilder, type BoostFlawState }; diff --git a/src/module/actor/character/crafting/entry.ts b/src/module/actor/character/crafting/entry.ts index 9ae094c580c..c5010c2f79e 100644 --- a/src/module/actor/character/crafting/entry.ts +++ b/src/module/actor/character/crafting/entry.ts @@ -1,5 +1,5 @@ -import { ActorPF2e, CharacterPF2e } from "@actor"; -import { ItemPF2e } from "@item"; +import type { ActorPF2e, CharacterPF2e } from "@actor"; +import type { ItemPF2e } from "@item"; import { CraftingEntryRuleData, CraftingEntryRuleSource } from "@module/rules/rule-element/crafting/entry.ts"; import { PredicatePF2e, RawPredicate } from "@system/predication.ts"; import { CraftingFormula } from "./formula.ts"; @@ -271,4 +271,5 @@ interface PreparedFormulaSheetData { isSignatureItem: boolean; } -export { CraftingEntry, CraftingEntryData, PreparedFormulaData }; +export { CraftingEntry }; +export type { CraftingEntryData, PreparedFormulaData }; diff --git a/src/module/actor/character/crafting/formula.ts b/src/module/actor/character/crafting/formula.ts index 6364cfd9869..cc4f56937e7 100644 --- a/src/module/actor/character/crafting/formula.ts +++ b/src/module/actor/character/crafting/formula.ts @@ -5,7 +5,7 @@ import { CoinsPF2e } from "@item/physical/helpers.ts"; import { Rarity } from "@module/data.ts"; import { calculateDC } from "@module/dc.ts"; -export class CraftingFormula implements CraftingFormulaData { +class CraftingFormula implements CraftingFormulaData { /** The difficulty class to craft this item */ dc: number; @@ -80,10 +80,12 @@ export class CraftingFormula implements CraftingFormulaData { } } -export interface CraftingFormulaData { +interface CraftingFormulaData { uuid: ItemUUID; sort?: number; dc?: number; batchSize?: number; deletable?: boolean; } + +export { CraftingFormula, type CraftingFormulaData }; diff --git a/src/module/actor/character/data.ts b/src/module/actor/character/data.ts index ff825346231..ee9b6e3ac54 100644 --- a/src/module/actor/character/data.ts +++ b/src/module/actor/character/data.ts @@ -1,4 +1,4 @@ -import { ActorPF2e } from "@actor"; +import type { ActorPF2e } from "@actor"; import { CraftingEntryData } from "@actor/character/crafting/entry.ts"; import { CraftingFormulaData } from "@actor/character/crafting/formula.ts"; import { @@ -23,7 +23,7 @@ import { CreatureTraitsSource, SenseData, } from "@actor/creature/index.ts"; -import { CreatureSensePF2e } from "@actor/creature/sense.ts"; +import type { CreatureSensePF2e } from "@actor/creature/sense.ts"; import { ActorAttributesSource, ActorFlagsPF2e, @@ -35,7 +35,7 @@ import { TraitViewData, } from "@actor/data/base.ts"; import { AttributeString, MovementType, SaveType } from "@actor/types.ts"; -import { FeatPF2e, ItemPF2e, WeaponPF2e } from "@item"; +import type { FeatPF2e, ItemPF2e, WeaponPF2e } from "@item"; import { ArmorCategory } from "@item/armor/types.ts"; import { ItemSystemData } from "@item/data/base.ts"; import { ProficiencyRank } from "@item/data/index.ts"; @@ -45,10 +45,10 @@ import { MagicTradition } from "@item/spell/types.ts"; import { BaseWeaponType, WeaponCategory, WeaponGroup } from "@item/weapon/types.ts"; import { ValueAndMax, ZeroToFour } from "@module/data.ts"; import { DamageType } from "@system/damage/types.ts"; -import { PredicatePF2e } from "@system/predication.ts"; +import type { PredicatePF2e } from "@system/predication.ts"; import { ArmorClassTraceData } from "@system/statistic/armor-class.ts"; import { StatisticTraceData } from "@system/statistic/data.ts"; -import { CharacterPF2e } from "./document.ts"; +import type { CharacterPF2e } from "./document.ts"; import { FeatGroup } from "./feats.ts"; import { WeaponAuxiliaryAction } from "./helpers.ts"; import { CharacterSheetTabVisibility } from "./sheet.ts"; @@ -526,7 +526,7 @@ interface BonusFeat { feat: T; } -export { +export type { BaseWeaponProficiencyKey, BonusFeat, CategoryProficiencies, diff --git a/src/module/actor/character/elemental-blast.ts b/src/module/actor/character/elemental-blast.ts index 36a9edd0d08..417e6cb15cf 100644 --- a/src/module/actor/character/elemental-blast.ts +++ b/src/module/actor/character/elemental-blast.ts @@ -1,8 +1,9 @@ import { AttackTraitHelpers } from "@actor/creature/helpers.ts"; import { calculateMAPs } from "@actor/helpers.ts"; import { ModifierPF2e, StatisticModifier } from "@actor/modifiers.ts"; -import { AbilityItemPF2e } from "@item"; +import type { AbilityItemPF2e } from "@item"; import { ActionTrait } from "@item/ability/types.ts"; +import { RangeData } from "@item/types.ts"; import { WeaponTrait } from "@item/weapon/types.ts"; import { extractDamageSynthetics, extractModifierAdjustments } from "@module/rules/helpers.ts"; import { ElementTrait, elementTraits } from "@scripts/config/traits.ts"; @@ -26,8 +27,7 @@ import type { SchemaField, StringField, } from "types/foundry/common/data/fields.d.ts"; -import { CharacterPF2e } from "./document.ts"; -import { RangeData } from "@item/types.ts"; +import type { CharacterPF2e } from "./document.ts"; class ElementalBlast { actor: CharacterPF2e; @@ -521,4 +521,4 @@ interface BlastConfigDamageType { selected: boolean; } -export { ElementalBlast, ElementalBlastConfig }; +export { ElementalBlast, type ElementalBlastConfig }; diff --git a/src/module/actor/character/feats.ts b/src/module/actor/character/feats.ts index de5fcfc2a0c..2f659feec06 100644 --- a/src/module/actor/character/feats.ts +++ b/src/module/actor/character/feats.ts @@ -1,9 +1,9 @@ +import { ActorPF2e } from "@actor"; import { FeatPF2e, ItemPF2e } from "@item"; import { FeatCategory } from "@item/feat/types.ts"; import { sluggify, tupleHasValue } from "@util"; -import { CharacterPF2e } from "./document.ts"; import { BonusFeat, FeatLike, SlottedFeat } from "./data.ts"; -import { ActorPF2e } from "@actor"; +import type { CharacterPF2e } from "./document.ts"; type FeatSlotLevel = number | { id: string; label: string }; @@ -337,4 +337,5 @@ function isFeatLike(item: ItemPF2e): item is FeatLike { return "category" in item && "location" in item.system && "isFeat" in item && "isFeature" in item; } -export { CharacterFeats, FeatGroup, FeatGroupOptions, FeatSlotLevel }; +export { CharacterFeats, FeatGroup }; +export type { FeatGroupOptions, FeatSlotLevel }; diff --git a/src/module/actor/character/sheet.ts b/src/module/actor/character/sheet.ts index fd6c508d37b..d4c65f54016 100644 --- a/src/module/actor/character/sheet.ts +++ b/src/module/actor/character/sheet.ts @@ -1588,4 +1588,4 @@ interface ElementalBlastSheetConfig extends ElementalBlastConfig { }; } -export { CharacterSheetPF2e, CharacterSheetTabVisibility }; +export { CharacterSheetPF2e, type CharacterSheetTabVisibility }; diff --git a/src/module/actor/character/types.ts b/src/module/actor/character/types.ts index 76507dfbe0d..fa0ca195e91 100644 --- a/src/module/actor/character/types.ts +++ b/src/module/actor/character/types.ts @@ -2,7 +2,7 @@ import { HitPointsSummary } from "@actor/base.ts"; import { AttributeString, SaveType, SkillLongForm } from "@actor/types.ts"; import { MagicTradition } from "@item/spell/types.ts"; import { ZeroToFour } from "@module/data.ts"; -import { Statistic } from "@system/statistic/index.ts"; +import type { Statistic } from "@system/statistic/index.ts"; interface CharacterHitPointsSummary extends HitPointsSummary { recoveryMultiplier: number; @@ -32,7 +32,7 @@ type GuaranteedGetStatisticSlug = | "classDC" | MagicTradition; -export { +export type { CharacterHitPointsSummary, CharacterSkill, CharacterSkills, diff --git a/src/module/actor/creature/config.ts b/src/module/actor/creature/config.ts index 3e578251ae9..312f464a2f2 100644 --- a/src/module/actor/creature/config.ts +++ b/src/module/actor/creature/config.ts @@ -1,7 +1,7 @@ import { ALLIANCES } from "@actor/creature/values.ts"; import { createSheetOptions, SheetOptions } from "@module/sheet/helpers.ts"; import { ErrorPF2e, setHasElement } from "@util"; -import { CreaturePF2e } from "./index.ts"; +import type { CreaturePF2e } from "./index.ts"; import { BaseCreatureSource, CreatureSystemSource, CreatureType } from "./data.ts"; /** A DocumentSheet presenting additional, per-actor settings */ @@ -68,4 +68,4 @@ interface CreatureConfigData extends DocumentSheetD alliances: SheetOptions; } -export { CreatureConfig, CreatureConfigData }; +export { CreatureConfig, type CreatureConfigData }; diff --git a/src/module/actor/creature/data.ts b/src/module/actor/creature/data.ts index abab99b0fd3..e8359139729 100644 --- a/src/module/actor/creature/data.ts +++ b/src/module/actor/creature/data.ts @@ -10,7 +10,7 @@ import { BaseActorSourcePF2e, StrikeData, } from "@actor/data/base.ts"; -import { DamageDicePF2e, ModifierPF2e, RawModifier, StatisticModifier } from "@actor/modifiers.ts"; +import type { DamageDicePF2e, ModifierPF2e, RawModifier, StatisticModifier } from "@actor/modifiers.ts"; import type { ActorAlliance, AttributeString, @@ -21,8 +21,8 @@ import type { } from "@actor/types.ts"; import type { CREATURE_ACTOR_TYPES } from "@actor/values.ts"; import { LabeledNumber, ValueAndMax, ValuesList, ZeroToThree } from "@module/data.ts"; -import { Statistic, StatisticTraceData } from "@system/statistic/index.ts"; -import { CreatureSensePF2e, SenseAcuity, SenseType } from "./sense.ts"; +import type { Statistic, StatisticTraceData } from "@system/statistic/index.ts"; +import type { CreatureSensePF2e, SenseAcuity, SenseType } from "./sense.ts"; import { Alignment, CreatureTrait } from "./types.ts"; type BaseCreatureSource = BaseActorSourcePF2e< @@ -228,7 +228,8 @@ interface HeldShieldData { icon: ImageFilePath; } -export { +export { VisionLevels }; +export type { Abilities, AbilityData, Attitude, @@ -255,5 +256,4 @@ export { SkillAbbreviation, SkillData, VisionLevel, - VisionLevels, }; diff --git a/src/module/actor/creature/types.ts b/src/module/actor/creature/types.ts index 80d71fb43ed..f26a0ccd276 100644 --- a/src/module/actor/creature/types.ts +++ b/src/module/actor/creature/types.ts @@ -1,13 +1,13 @@ -import { ActorPF2e, ActorUpdateContext } from "@actor/base.ts"; +import type { ActorPF2e, ActorUpdateContext } from "@actor/base.ts"; import { ActorSheetDataPF2e } from "@actor/sheet/data-types.ts"; import { AttributeString, SaveType } from "@actor/types.ts"; import { AbilityItemPF2e, MeleePF2e, WeaponPF2e } from "@item"; import { ZeroToFour } from "@module/data.ts"; import { SheetOptions } from "@module/sheet/helpers.ts"; -import { TokenDocumentPF2e } from "@scene/index.ts"; +import type { TokenDocumentPF2e } from "@scene/index.ts"; import { AbilityData, CreatureSystemData, SaveData, SkillData } from "./data.ts"; -import { CreaturePF2e } from "./document.ts"; -import { ALIGNMENTS, ALIGNMENT_TRAITS } from "./values.ts"; +import type { CreaturePF2e } from "./document.ts"; +import type { ALIGNMENTS, ALIGNMENT_TRAITS } from "./values.ts"; type Alignment = SetElement; type AlignmentTrait = SetElement; @@ -50,7 +50,7 @@ interface CreatureSheetData extends ActorSheetDataP }; } -export { +export type { Alignment, AlignmentTrait, CreatureSheetData, diff --git a/src/module/actor/data/base.ts b/src/module/actor/data/base.ts index 6d6616a5470..26dd31ffd87 100644 --- a/src/module/actor/data/base.ts +++ b/src/module/actor/data/base.ts @@ -1,19 +1,26 @@ -import { ActorPF2e } from "@actor/base.ts"; +import type { ActorPF2e } from "@actor/base.ts"; import { DexterityModifierCapData } from "@actor/character/types.ts"; import { Abilities } from "@actor/creature/data.ts"; -import { ActorSizePF2e } from "@actor/data/size.ts"; -import { StatisticModifier } from "@actor/modifiers.ts"; +import type { ActorSizePF2e } from "@actor/data/size.ts"; +import type { StatisticModifier } from "@actor/modifiers.ts"; import { ActorAlliance, AttributeString, SkillLongForm } from "@actor/types.ts"; -import { ConsumablePF2e, MeleePF2e, WeaponPF2e } from "@item"; +import type { ConsumablePF2e, MeleePF2e, WeaponPF2e } from "@item"; import { ItemSourcePF2e } from "@item/data/index.ts"; import { DocumentSchemaRecord, Rarity, Size, ValueAndMaybeMax, ZeroToTwo } from "@module/data.ts"; import { AutoChangeEntry } from "@module/rules/rule-element/ae-like.ts"; import { AttackRollParams, DamageRollParams, RollParameters } from "@module/system/rolls.ts"; -import { CheckRoll } from "@system/check/roll.ts"; -import { DamageRoll } from "@system/damage/roll.ts"; +import type { CheckRoll } from "@system/check/roll.ts"; +import type { DamageRoll } from "@system/damage/roll.ts"; import { StatisticTraceData } from "@system/statistic/data.ts"; import { ActorType } from "./index.ts"; -import { ImmunityData, ImmunitySource, ResistanceData, ResistanceSource, WeaknessData, WeaknessSource } from "./iwr.ts"; +import type { + ImmunityData, + ImmunitySource, + ResistanceData, + ResistanceSource, + WeaknessData, + WeaknessSource, +} from "./iwr.ts"; /** Base interface for all actor data */ interface BaseActorSourcePF2e @@ -278,7 +285,7 @@ interface PrototypeTokenPF2e extends foundry.d }; } -export { +export type { ActorAttributes, ActorAttributesSource, ActorDetails, diff --git a/src/module/actor/data/index.ts b/src/module/actor/data/index.ts index b3fb11daf66..a0ee1e8eb4a 100644 --- a/src/module/actor/data/index.ts +++ b/src/module/actor/data/index.ts @@ -17,7 +17,7 @@ interface RollInitiativeOptionsPF2e extends RollInitiativeOptions, StatisticRoll secret?: boolean; } -export { +export type { ActorSourcePF2e, ActorType, CharacterSource, diff --git a/src/module/actor/data/iwr.ts b/src/module/actor/data/iwr.ts index c112db710e8..280ff18abcb 100644 --- a/src/module/actor/data/iwr.ts +++ b/src/module/actor/data/iwr.ts @@ -330,13 +330,5 @@ const NON_DAMAGE_WEAKNESSES: Set = new Set([ "wood", ]); -export { - ImmunityData, - ImmunitySource, - IWRSource, - NON_DAMAGE_WEAKNESSES, - ResistanceData, - ResistanceSource, - WeaknessData, - WeaknessSource, -}; +export { ImmunityData, NON_DAMAGE_WEAKNESSES, ResistanceData, WeaknessData }; +export type { ImmunitySource, IWRSource, ResistanceSource, WeaknessSource }; diff --git a/src/module/actor/familiar/data.ts b/src/module/actor/familiar/data.ts index 7ab2d4e2b9d..a6ca82e2324 100644 --- a/src/module/actor/familiar/data.ts +++ b/src/module/actor/familiar/data.ts @@ -9,7 +9,7 @@ import { } from "@actor/creature/data.ts"; import type { CreatureSensePF2e } from "@actor/creature/sense.ts"; import { AttributeString } from "@actor/types.ts"; -import type { StatisticTraceData } from "@system/statistic/index.ts"; +import { StatisticTraceData } from "@system/statistic/index.ts"; type FamiliarSource = BaseCreatureSource<"familiar", FamiliarSystemSource>; @@ -74,4 +74,4 @@ interface FamiliarTraitsData extends CreatureTraitsData { senses: CreatureSensePF2e[]; } -export { FamiliarSource, FamiliarSystemData, FamiliarSystemSource }; +export type { FamiliarSource, FamiliarSystemData, FamiliarSystemSource }; diff --git a/src/module/actor/hazard/data.ts b/src/module/actor/hazard/data.ts index f5f8d652edb..d378db68491 100644 --- a/src/module/actor/hazard/data.ts +++ b/src/module/actor/hazard/data.ts @@ -10,7 +10,7 @@ import { ActorTraitsSource, BaseActorSourcePF2e, } from "@actor/data/base.ts"; -import { ActorSizePF2e } from "@actor/data/size.ts"; +import type { ActorSizePF2e } from "@actor/data/size.ts"; import { InitiativeTraceData } from "@actor/initiative.ts"; import { NPCStrike } from "@actor/npc/index.ts"; import { SaveType } from "@actor/types.ts"; @@ -114,4 +114,4 @@ interface HazardHitPoints extends ActorHitPoints { type HazardSaveData = Omit; type HazardSaves = Record; -export { HazardSource, HazardSystemData }; +export type { HazardSource, HazardSystemData }; diff --git a/src/module/actor/hazard/types.ts b/src/module/actor/hazard/types.ts index 6a4d1a626b2..6861bf34eda 100644 --- a/src/module/actor/hazard/types.ts +++ b/src/module/actor/hazard/types.ts @@ -1,8 +1,8 @@ -import { HazardPF2e } from "@actor"; +import type { HazardPF2e } from "@actor"; import { TraitViewData } from "@actor/data/base.ts"; import { ActorSheetDataPF2e } from "@actor/sheet/data-types.ts"; import { SaveType } from "@actor/types.ts"; -import { AbilityItemPF2e } from "@item"; +import type { AbilityItemPF2e } from "@item"; interface HazardSheetData extends ActorSheetDataPF2e { actions: HazardActionSheetData; @@ -39,4 +39,4 @@ interface HazardSaveSheetData { type HazardTrait = keyof ConfigPF2e["PF2E"]["hazardTraits"]; -export { HazardActionSheetData, HazardSaveSheetData, HazardSheetData, HazardTrait }; +export type { HazardActionSheetData, HazardSaveSheetData, HazardSheetData, HazardTrait }; diff --git a/src/module/actor/initiative.ts b/src/module/actor/initiative.ts index 390ed850c3c..e4a3069f583 100644 --- a/src/module/actor/initiative.ts +++ b/src/module/actor/initiative.ts @@ -100,4 +100,5 @@ class ActorInitiative { type InitiativeTraceData = StatisticTraceData & InitiativeData; -export { ActorInitiative, InitiativeRollResult, InitiativeTraceData }; +export { ActorInitiative }; +export type { InitiativeRollResult, InitiativeTraceData }; diff --git a/src/module/actor/loot/data.ts b/src/module/actor/loot/data.ts index 8600fb9f890..f3451f67884 100644 --- a/src/module/actor/loot/data.ts +++ b/src/module/actor/loot/data.ts @@ -52,4 +52,4 @@ interface LootDetails extends Omit, ActorDetails alliance: null; } -export { LootSource, LootSystemData, LootSystemSource }; +export type { LootSource, LootSystemData, LootSystemSource }; diff --git a/src/module/actor/modifiers.ts b/src/module/actor/modifiers.ts index 5c5ed3a63a4..51da87026c9 100644 --- a/src/module/actor/modifiers.ts +++ b/src/module/actor/modifiers.ts @@ -1,7 +1,7 @@ -import { ActorPF2e, CharacterPF2e, NPCPF2e } from "@actor"; +import type { ActorPF2e, CharacterPF2e, NPCPF2e } from "@actor"; import { AttributeString } from "@actor/types.ts"; import { ZeroToFour } from "@module/data.ts"; -import { RollNotePF2e } from "@module/notes.ts"; +import type { RollNotePF2e } from "@module/notes.ts"; import { extractModifierAdjustments } from "@module/rules/helpers.ts"; import type { RuleElementPF2e } from "@module/rules/index.ts"; import { DamageCategoryUnique, DamageDieSize, DamageType } from "@system/damage/types.ts"; @@ -695,25 +695,27 @@ class DamageDicePF2e { type RawDamageDice = Required; export { - BaseRawModifier, CheckModifier, DamageDicePF2e, - DamageDiceOverride, - DamageDiceParameters, - DeferredPromise, - DeferredValue, - DeferredValueParams, MODIFIER_TYPES, - ModifierAdjustment, ModifierPF2e, - ModifierType, PROFICIENCY_RANK_OPTION, - RawModifier, StatisticModifier, - TestableDeferredValueParams, adjustModifiers, applyStackingRules, createAttributeModifier, createProficiencyModifier, ensureProficiencyOption, }; +export type { + BaseRawModifier, + DamageDiceOverride, + DamageDiceParameters, + DeferredPromise, + DeferredValue, + DeferredValueParams, + ModifierAdjustment, + ModifierType, + RawModifier, + TestableDeferredValueParams, +}; diff --git a/src/module/actor/npc/data.ts b/src/module/actor/npc/data.ts index 201a0acbde2..45480afc89c 100644 --- a/src/module/actor/npc/data.ts +++ b/src/module/actor/npc/data.ts @@ -1,4 +1,4 @@ -import { ActorPF2e } from "@actor/base.ts"; +import type { ActorPF2e } from "@actor/base.ts"; import { Abilities, BaseCreatureSource, @@ -248,7 +248,7 @@ interface NPCSpeeds extends CreatureSpeeds { details: string; } -export { +export type { NPCAttributes, NPCAttributesSource, NPCFlags, diff --git a/src/module/actor/npc/types.ts b/src/module/actor/npc/types.ts index 923b70dba98..f8de9c621cb 100644 --- a/src/module/actor/npc/types.ts +++ b/src/module/actor/npc/types.ts @@ -1,13 +1,13 @@ import { CreatureSheetData } from "@actor/creature/types.ts"; import { HitPointsStatistic, PerceptionData } from "@actor/data/base.ts"; import { MovementType, SaveType, SkillAbbreviation } from "@actor/types.ts"; -import { AbilityItemPF2e, EffectPF2e, ItemPF2e } from "@item"; +import type { AbilityItemPF2e, EffectPF2e, ItemPF2e } from "@item"; import { SpellcastingSheetData } from "@item/spellcasting-entry/index.ts"; import { ZeroToFour } from "@module/data.ts"; import { TraitTagifyEntry } from "@module/sheet/helpers.ts"; import { ArmorClassTraceData } from "@system/statistic/armor-class.ts"; import { NPCAttributes, NPCSaveData, NPCSkillData, NPCSystemData } from "./data.ts"; -import { NPCPF2e, NPCStrike } from "./index.ts"; +import type { NPCPF2e, NPCStrike } from "./index.ts"; interface ActionsDetails { label: string; @@ -130,7 +130,7 @@ interface NPCIdentificationSheetData { lore: string; } -export { +export type { NPCActionSheetData, NPCIdentificationSheetData, NPCSheetData, diff --git a/src/module/actor/party/data.ts b/src/module/actor/party/data.ts index 241544ec505..0eb42cf4f32 100644 --- a/src/module/actor/party/data.ts +++ b/src/module/actor/party/data.ts @@ -61,4 +61,4 @@ interface PartyDetails extends Omit, A type PartyCampaignSource = { type: string } & Record; -export { MemberData, PartyCampaignSource, PartySource, PartySystemData }; +export type { MemberData, PartyCampaignSource, PartySource, PartySystemData }; diff --git a/src/module/actor/party/kingdom/types.ts b/src/module/actor/party/kingdom/types.ts index 522be7a544d..8e8bb3c152e 100644 --- a/src/module/actor/party/kingdom/types.ts +++ b/src/module/actor/party/kingdom/types.ts @@ -1,5 +1,5 @@ -import { KINGDOM_SCHEMA } from "./schema.ts"; -import { KINGDOM_ABILITIES, KINGDOM_COMMODITIES, KINGDOM_LEADERSHIP, KINGDOM_SKILLS } from "./values.ts"; +import type { KINGDOM_SCHEMA } from "./schema.ts"; +import type { KINGDOM_ABILITIES, KINGDOM_COMMODITIES, KINGDOM_LEADERSHIP, KINGDOM_SKILLS } from "./values.ts"; interface KingdomCHG { name: string; @@ -27,7 +27,7 @@ type KingdomLeadershipData = KingdomData["leadership"][KingdomLeadershipRole]; type FameType = "fame" | "infamy"; -export { +export type { KingdomAbility, KingdomAbilityData, KingdomCommodity, diff --git a/src/module/actor/party/sheet.ts b/src/module/actor/party/sheet.ts index 58affd48307..1bb637bc541 100644 --- a/src/module/actor/party/sheet.ts +++ b/src/module/actor/party/sheet.ts @@ -15,7 +15,7 @@ import { eventToRollParams } from "@scripts/sheet-util.ts"; import { SocketMessage } from "@scripts/socket.ts"; import { InlineRollLinks } from "@scripts/ui/inline-roll-links.ts"; import { SettingsMenuOptions } from "@system/settings/menu.ts"; -import { Statistic } from "@system/statistic/index.ts"; +import type { Statistic } from "@system/statistic/index.ts"; import { addSign, createHTMLElement, htmlClosest, htmlQuery, htmlQueryAll, sortBy, sum } from "@util"; import * as R from "remeda"; import { PartyPF2e } from "./document.ts"; @@ -561,4 +561,4 @@ interface LanguageSheetData { actors: ActorPF2e[]; } -export { PartySheetPF2e, PartySheetRenderOptions }; +export { PartySheetPF2e, type PartySheetRenderOptions }; diff --git a/src/module/actor/party/types.ts b/src/module/actor/party/types.ts index cd6d4f55477..32c248bb5df 100644 --- a/src/module/actor/party/types.ts +++ b/src/module/actor/party/types.ts @@ -1,9 +1,9 @@ import { ActorUpdateContext } from "@actor/base.ts"; import { ItemType } from "@item/data/index.ts"; -import { TokenDocumentPF2e } from "@scene"; -import { Statistic } from "@system/statistic/index.ts"; +import type { TokenDocumentPF2e } from "@scene"; +import type { Statistic } from "@system/statistic/index.ts"; import type DataModel from "types/foundry/common/abstract/data.d.ts"; -import { PartyPF2e } from "./document.ts"; +import type { PartyPF2e } from "./document.ts"; interface PartyUpdateContext extends ActorUpdateContext { removedMembers?: string[]; @@ -29,4 +29,4 @@ interface PartyCampaign extends DataModel { prepareDerivedData?(): void; } -export { PartyCampaign, PartyUpdateContext }; +export type { PartyCampaign, PartyUpdateContext }; diff --git a/src/module/actor/types.ts b/src/module/actor/types.ts index 2b34d1a44ab..83f64f1133d 100644 --- a/src/module/actor/types.ts +++ b/src/module/actor/types.ts @@ -3,16 +3,16 @@ import type { ActorPF2e } from "@actor"; import type { ItemPF2e } from "@item"; import { EffectTrait } from "@item/abstract-effect/index.ts"; import { ItemInstances } from "@item/types.ts"; -import { TokenPF2e } from "@module/canvas/index.ts"; -import { TokenDocumentPF2e } from "@scene/index.ts"; +import type { TokenPF2e } from "@module/canvas/index.ts"; +import type { TokenDocumentPF2e } from "@scene/index.ts"; import { immunityTypes, resistanceTypes, weaknessTypes } from "@scripts/config/iwr.ts"; -import { DamageRoll } from "@system/damage/roll.ts"; +import type { DamageRoll } from "@system/damage/roll.ts"; import { CheckDC, DegreeOfSuccessString } from "@system/degree-of-success.ts"; -import { PredicatePF2e } from "@system/predication.ts"; -import { StatisticCheck } from "@system/statistic/index.ts"; +import type { PredicatePF2e } from "@system/predication.ts"; +import type { StatisticCheck } from "@system/statistic/index.ts"; import { StrikeData, TraitViewData } from "./data/base.ts"; -import { ModifierPF2e } from "./modifiers.ts"; -import { +import type { ModifierPF2e } from "./modifiers.ts"; +import type { ATTRIBUTE_ABBREVIATIONS, DC_SLUGS, MOVEMENT_TYPES, @@ -185,7 +185,7 @@ type ResistanceType = keyof typeof resistanceTypes; type UnaffectedType = SetElement; type IWRType = ImmunityType | WeaknessType | ResistanceType; -export { +export type { ActorAlliance, ActorDimensions, ActorInstances, diff --git a/src/module/actor/vehicle/data.ts b/src/module/actor/vehicle/data.ts index 19dcba72e37..b2e248a6d63 100644 --- a/src/module/actor/vehicle/data.ts +++ b/src/module/actor/vehicle/data.ts @@ -9,7 +9,7 @@ import { BaseActorSourcePF2e, } from "@actor/data/base.ts"; import { ImmunitySource } from "@actor/data/iwr.ts"; -import { ActorSizePF2e } from "@actor/data/size.ts"; +import type { ActorSizePF2e } from "@actor/data/size.ts"; import { Rarity, Size } from "@module/data.ts"; import { ArmorClassTraceData } from "@system/statistic/armor-class.ts"; import { StatisticTraceData } from "@system/statistic/index.ts"; @@ -91,4 +91,4 @@ interface TokenDimensions { height: number; } -export { TokenDimensions, VehicleSource, VehicleSystemData, VehicleTrait }; +export type { TokenDimensions, VehicleSource, VehicleSystemData, VehicleTrait }; diff --git a/src/module/actor/vehicle/types.ts b/src/module/actor/vehicle/types.ts index 82542baa726..63662e4cd3d 100644 --- a/src/module/actor/vehicle/types.ts +++ b/src/module/actor/vehicle/types.ts @@ -1,3 +1,3 @@ type VehicleTrait = keyof ConfigPF2e["PF2E"]["vehicleTraits"]; -export { VehicleTrait }; +export type { VehicleTrait }; diff --git a/src/module/apps/compendium-browser/data.ts b/src/module/apps/compendium-browser/data.ts index 7850b27f6ac..ce7db607437 100644 --- a/src/module/apps/compendium-browser/data.ts +++ b/src/module/apps/compendium-browser/data.ts @@ -29,7 +29,7 @@ type CommonSortByOption = "name" | "level"; type SortByOption = CommonSortByOption | "price"; type SortDirection = "asc" | "desc"; -export { +export type { BrowserTab, BrowserTabs, CommonSortByOption, diff --git a/src/module/apps/compendium-browser/index.ts b/src/module/apps/compendium-browser/index.ts index 7bb4ff6c8f9..e5b66a2b0d2 100644 --- a/src/module/apps/compendium-browser/index.ts +++ b/src/module/apps/compendium-browser/index.ts @@ -2,7 +2,7 @@ import { KitPF2e, PhysicalItemPF2e } from "@item"; import { ActionCategory, ActionTrait } from "@item/ability/index.ts"; import { ActionType } from "@item/data/base.ts"; import { BaseSpellcastingEntry } from "@item/spellcasting-entry/index.ts"; -import { UserPF2e } from "@module/user/document.ts"; +import type { UserPF2e } from "@module/user/document.ts"; import { ErrorPF2e, htmlQuery, htmlQueryAll, isBlank, isObject, localizer, objectHasKey, sluggify } from "@util"; import { getSelectedOrOwnActors } from "@util/token-actor-utils.ts"; import Tagify from "@yaireo/tagify"; @@ -1174,4 +1174,5 @@ interface CompendiumBrowserSources { sources: CompendiumBrowserSourcesList; } -export { CompendiumBrowser, CompendiumBrowserSettings, CompendiumBrowserSources }; +export { CompendiumBrowser }; +export type { CompendiumBrowserSettings, CompendiumBrowserSources }; diff --git a/src/module/apps/compendium-browser/tabs/data.ts b/src/module/apps/compendium-browser/tabs/data.ts index e56d23a4ebb..512dd939018 100644 --- a/src/module/apps/compendium-browser/tabs/data.ts +++ b/src/module/apps/compendium-browser/tabs/data.ts @@ -3,7 +3,7 @@ import { HazardTrait } from "@actor/hazard/types.ts"; import { ActionTrait } from "@item/ability/index.ts"; import { FeatTrait } from "@item/feat/types.ts"; import { PhysicalItemTrait } from "@item/physical/data.ts"; -import { SearchResult } from "minisearch"; +import type { SearchResult } from "minisearch"; import { SortDirection } from "../data.ts"; type CheckboxOptions = Record; @@ -160,7 +160,7 @@ interface RenderResultListOptions { replace?: boolean; } -export { +export type { ActionFilters, BaseFilterData, BestiaryFilters, diff --git a/src/module/apps/pick-a-thing-prompt.ts b/src/module/apps/pick-a-thing-prompt.ts index 43d7ab181d5..985100a4afe 100644 --- a/src/module/apps/pick-a-thing-prompt.ts +++ b/src/module/apps/pick-a-thing-prompt.ts @@ -1,5 +1,5 @@ -import { ActorPF2e } from "@actor"; -import { ItemPF2e } from "@item"; +import type { ActorPF2e } from "@actor"; +import type { ItemPF2e } from "@item"; import { PredicatePF2e } from "@system/predication.ts"; import { ErrorPF2e, htmlQuery, htmlQueryAll, sluggify } from "@util"; import Tagify from "@yaireo/tagify"; @@ -161,4 +161,5 @@ interface PromptTemplateData { selectMenu: boolean; } -export { PickAThingConstructorArgs, PickAThingPrompt, PickableThing, PromptTemplateData }; +export { PickAThingPrompt }; +export type { PickAThingConstructorArgs, PickableThing, PromptTemplateData }; diff --git a/src/module/canvas/token/aura/renderer.ts b/src/module/canvas/token/aura/renderer.ts index fd097b9c0a6..7b007af6d2c 100644 --- a/src/module/canvas/token/aura/renderer.ts +++ b/src/module/canvas/token/aura/renderer.ts @@ -1,8 +1,8 @@ import { AuraColors, AuraData } from "@actor/types.ts"; import { ItemTrait } from "@item/data/base.ts"; import { TokenAuraData } from "@scene/token-document/aura/index.ts"; -import { EffectAreaSquare } from "../../effect-area-square.ts"; -import { TokenPF2e } from "../index.ts"; +import type { EffectAreaSquare } from "../../effect-area-square.ts"; +import type { TokenPF2e } from "../index.ts"; import { getAreaSquares } from "./util.ts"; /** Visual rendering of auras emanated by a token's actor */ @@ -144,4 +144,4 @@ interface AuraRendererParams extends Omit { traits: Set; } -export { AuraRenderer, TokenAuraColors }; +export { AuraRenderer, type TokenAuraColors }; diff --git a/src/module/canvas/token/object.ts b/src/module/canvas/token/object.ts index 30add1b1d4e..af13ea2d059 100644 --- a/src/module/canvas/token/object.ts +++ b/src/module/canvas/token/object.ts @@ -1,5 +1,5 @@ import { EffectPF2e } from "@item"; -import { UserPF2e } from "@module/user/document.ts"; +import type { UserPF2e } from "@module/user/document.ts"; import type { TokenDocumentPF2e } from "@scene/index.ts"; import type { Renderer } from "pixi.js"; import * as R from "remeda"; @@ -447,4 +447,5 @@ interface TokenAnimationOptionsPF2e exten spin?: boolean; } -export { ShowFloatyEffectParams, TokenAnimationOptionsPF2e, TokenPF2e }; +export { TokenPF2e }; +export type { ShowFloatyEffectParams, TokenAnimationOptionsPF2e }; diff --git a/src/module/chat-message/data.ts b/src/module/chat-message/data.ts index 9d920e039b8..1195edf2cab 100644 --- a/src/module/chat-message/data.ts +++ b/src/module/chat-message/data.ts @@ -1,4 +1,4 @@ -import { BaseRawModifier, DamageDicePF2e } from "@actor/modifiers.ts"; +import type { BaseRawModifier, DamageDicePF2e } from "@actor/modifiers.ts"; import { ItemType } from "@item/data/index.ts"; import { MagicTradition } from "@item/spell/types.ts"; import { ZeroToTwo } from "@module/data.ts"; @@ -132,7 +132,7 @@ interface AppliedDamageFlag { updates: { path: string; value: number }[]; } -export { +export type { AppliedDamageFlag, ChatContextFlag, ChatMessageFlagsPF2e, diff --git a/src/module/data.ts b/src/module/data.ts index 8ac072d3ea9..32f68732a48 100644 --- a/src/module/data.ts +++ b/src/module/data.ts @@ -136,7 +136,8 @@ type EnfolderableDocumentPF2e = | ItemPF2e | Exclude | Item>; -export { +export { RARITIES, SIZES, SIZE_SLUGS, goesToEleven }; +export type { DocumentSchemaRecord, EnfolderableDocumentPF2e, LabeledNumber, @@ -146,10 +147,7 @@ export { OneToFour, OneToTen, OneToThree, - RARITIES, Rarity, - SIZES, - SIZE_SLUGS, Size, TraitsWithRarity, TwoToThree, @@ -163,5 +161,4 @@ export { ZeroToTen, ZeroToThree, ZeroToTwo, - goesToEleven, }; diff --git a/src/module/dc.ts b/src/module/dc.ts index e3eb3e5ae89..c22a4a9a759 100644 --- a/src/module/dc.ts +++ b/src/module/dc.ts @@ -165,10 +165,6 @@ function createDifficultyScale(dc: number, startAt: DCAdjustment): number[] { } export { - DCAdjustment, - DCOptions, - NegativeDCAdjustment, - PositiveDCAdjustment, adjustDC, adjustDCByRarity, calculateDC, @@ -178,3 +174,4 @@ export { createDifficultyScale, rarityToDCAdjustment, }; +export type { DCAdjustment, DCOptions, NegativeDCAdjustment, PositiveDCAdjustment }; diff --git a/src/module/doc-helpers.ts b/src/module/doc-helpers.ts index 4d79abd9748..757adc9b442 100644 --- a/src/module/doc-helpers.ts +++ b/src/module/doc-helpers.ts @@ -4,7 +4,7 @@ import { isObject } from "@util"; import { MigrationList, MigrationRunner } from "./migration/index.ts"; import { MigrationRunnerBase } from "./migration/runner/base.ts"; import { CombatantPF2e } from "./encounter/index.ts"; -import { TokenDocumentPF2e } from "@scene/index.ts"; +import type { TokenDocumentPF2e } from "@scene/index.ts"; /** Ensure that the import JSON is actually importable and that the data is fully migrated */ async function preImportJSON( diff --git a/src/module/encounter/combatant.ts b/src/module/encounter/combatant.ts index 43e4d473868..4f3cb6e3401 100644 --- a/src/module/encounter/combatant.ts +++ b/src/module/encounter/combatant.ts @@ -1,8 +1,8 @@ -import { ActorPF2e } from "@actor"; +import type { ActorPF2e } from "@actor"; import { SkillLongForm } from "@actor/types.ts"; -import { TokenDocumentPF2e } from "@scene/index.ts"; +import type { TokenDocumentPF2e } from "@scene/index.ts"; import { ErrorPF2e } from "@util"; -import { EncounterPF2e } from "./index.ts"; +import type { EncounterPF2e } from "./index.ts"; class CombatantPF2e< TParent extends EncounterPF2e | null = EncounterPF2e | null, @@ -275,4 +275,5 @@ type RolledCombatant = CombatantPF2e; } -export { AbilityItemSource, AbilitySystemData, AbilityTraits, SelfEffectReference, SelfEffectReferenceSource }; +export type { AbilityItemSource, AbilitySystemData, AbilityTraits, SelfEffectReference, SelfEffectReferenceSource }; diff --git a/src/module/item/ability/types.ts b/src/module/item/ability/types.ts index 8f191a0e9e0..ec3c3cadec9 100644 --- a/src/module/item/ability/types.ts +++ b/src/module/item/ability/types.ts @@ -1,4 +1,4 @@ type ActionCategory = keyof ConfigPF2e["PF2E"]["actionCategories"]; type ActionTrait = keyof ConfigPF2e["PF2E"]["actionTraits"]; -export { ActionCategory, ActionTrait }; +export type { ActionCategory, ActionTrait }; diff --git a/src/module/item/abstract-effect/data.ts b/src/module/item/abstract-effect/data.ts index 641890893ea..5a5c5b5da55 100644 --- a/src/module/item/abstract-effect/data.ts +++ b/src/module/item/abstract-effect/data.ts @@ -2,7 +2,7 @@ import { AttributeString } from "@actor/types.ts"; import { ActionTrait } from "@item/ability/types.ts"; import { ItemSystemData, ItemSystemSource } from "@item/data/base.ts"; import { MagicTradition, SpellTrait } from "@item/spell/index.ts"; -import { CheckRoll } from "@system/check/index.ts"; +import type { CheckRoll } from "@system/check/index.ts"; interface AbstractEffectSystemSource extends ItemSystemSource { /** Whether this effect originated from a spell */ @@ -90,7 +90,7 @@ type EffectBadge = EffectBadgeCounter | EffectBadgeValue | EffectBadgeFormula; type TimeUnit = "rounds" | "minutes" | "hours" | "days"; -export { +export type { AbstractEffectSystemData, AbstractEffectSystemSource, EffectAuraData, diff --git a/src/module/item/affliction/data.ts b/src/module/item/affliction/data.ts index 0b8c3613662..7bd668cc62e 100644 --- a/src/module/item/affliction/data.ts +++ b/src/module/item/affliction/data.ts @@ -80,7 +80,7 @@ interface AfflictionEffectData { type AfflictionExpiryType = "turn-end"; -export { +export type { AfflictionExpiryType, AfflictionDuration, AfflictionConditionData, diff --git a/src/module/item/ancestry/data.ts b/src/module/item/ancestry/data.ts index b359bbb2e73..2ee5eada6f0 100644 --- a/src/module/item/ancestry/data.ts +++ b/src/module/item/ancestry/data.ts @@ -34,4 +34,4 @@ interface AncestrySystemSource extends ABCSystemSource { interface AncestrySystemData extends Omit, Omit {} -export { AncestrySource, AncestrySystemData }; +export type { AncestrySource, AncestrySystemData }; diff --git a/src/module/item/armor/data.ts b/src/module/item/armor/data.ts index 35da96e2d37..99f8724d9e3 100644 --- a/src/module/item/armor/data.ts +++ b/src/module/item/armor/data.ts @@ -55,4 +55,4 @@ interface ArmorTraits extends PhysicalItemTraits { otherTags: OtherArmorTag[]; } -export { ArmorSource, ArmorSystemData, ArmorSystemSource }; +export type { ArmorSource, ArmorSystemData, ArmorSystemSource }; diff --git a/src/module/item/armor/types.ts b/src/module/item/armor/types.ts index 770bd606cfb..4d9f150d432 100644 --- a/src/module/item/armor/types.ts +++ b/src/module/item/armor/types.ts @@ -5,4 +5,4 @@ type BaseArmorType = keyof ConfigPF2e["PF2E"]["baseArmorTypes"]; type ResilientRuneType = "" | "resilient" | "greaterResilient" | "majorResilient"; type OtherArmorTag = "shoddy"; -export { ArmorTrait, ArmorCategory, ArmorGroup, BaseArmorType, ResilientRuneType, OtherArmorTag }; +export type { ArmorTrait, ArmorCategory, ArmorGroup, BaseArmorType, ResilientRuneType, OtherArmorTag }; diff --git a/src/module/item/background/data.ts b/src/module/item/background/data.ts index b6b6bae60ea..e686c9f6c7f 100644 --- a/src/module/item/background/data.ts +++ b/src/module/item/background/data.ts @@ -17,4 +17,4 @@ interface BackgroundSystemSource extends ABCSystemSource { interface BackgroundSystemData extends Omit, Omit {} -export { BackgroundSource, BackgroundSystemData }; +export type { BackgroundSource, BackgroundSystemData }; diff --git a/src/module/item/background/document.ts b/src/module/item/background/document.ts index ac15a283746..6edd4f3edd9 100644 --- a/src/module/item/background/document.ts +++ b/src/module/item/background/document.ts @@ -1,5 +1,5 @@ -import { ActorPF2e, CharacterPF2e } from "@actor"; -import { ABCItemPF2e, FeatPF2e } from "@item"; +import type { ActorPF2e, CharacterPF2e } from "@actor"; +import { ABCItemPF2e, type FeatPF2e } from "@item"; import { OneToFour } from "@module/data.ts"; import { BackgroundSource, BackgroundSystemData } from "./data.ts"; diff --git a/src/module/item/book/data.ts b/src/module/item/book/data.ts index ce43d5c8ba7..8a576a2f7b8 100644 --- a/src/module/item/book/data.ts +++ b/src/module/item/book/data.ts @@ -19,4 +19,4 @@ interface SpellBookData { item: object[]; } -export { BookSource, BookSystemData }; +export type { BookSource, BookSystemData }; diff --git a/src/module/item/book/index.ts b/src/module/item/book/index.ts index 3e902640645..cf85bf33fcf 100644 --- a/src/module/item/book/index.ts +++ b/src/module/item/book/index.ts @@ -1,3 +1,3 @@ -export { BookSource } from "./data.ts"; +export type { BookSource } from "./data.ts"; export { BookPF2e } from "./document.ts"; export { BookSheetPF2e } from "./sheet.ts"; diff --git a/src/module/item/campaign-feature/data.ts b/src/module/item/campaign-feature/data.ts index f1bd6844393..367a1b41042 100644 --- a/src/module/item/campaign-feature/data.ts +++ b/src/module/item/campaign-feature/data.ts @@ -34,7 +34,7 @@ interface CampaignFeatureSystemData extends CampaignFeatureSystemSource { type KingmakerTraits = TraitsWithRarity; -export { +export type { CampaignFeatureSource, CampaignFeatureSystemData, CampaignFeatureSystemSource, diff --git a/src/module/item/campaign-feature/types.ts b/src/module/item/campaign-feature/types.ts index f02ebe83c65..855d04d971d 100644 --- a/src/module/item/campaign-feature/types.ts +++ b/src/module/item/campaign-feature/types.ts @@ -4,4 +4,4 @@ type BehaviorType = "feat" | "feature" | "activity"; type KingmakerCategory = (typeof KINGMAKER_CATEGORY_TYPES)[number]; type KingmakerTrait = keyof ConfigPF2e["PF2E"]["kingmakerTraits"]; -export { BehaviorType, KingmakerCategory, KingmakerTrait }; +export type { BehaviorType, KingmakerCategory, KingmakerTrait }; diff --git a/src/module/item/campaign-feature/values.ts b/src/module/item/campaign-feature/values.ts index ff11a97f88c..aa5f58f67c6 100644 --- a/src/module/item/campaign-feature/values.ts +++ b/src/module/item/campaign-feature/values.ts @@ -21,4 +21,5 @@ const KINGMAKER_CATEGORIES: Record = R.mapToObj(KINGM `PF2E.Kingmaker.Feature.Categories.${type}`, ]); -export { CategoryData, KINGMAKER_CATEGORIES, KINGMAKER_CATEGORY_TYPES, KINGDOM_CATEGORY_DATA }; +export { KINGDOM_CATEGORY_DATA, KINGMAKER_CATEGORIES, KINGMAKER_CATEGORY_TYPES }; +export type { CategoryData }; diff --git a/src/module/item/class/data.ts b/src/module/item/class/data.ts index 950c5e3b7f2..bc879aa4fb9 100644 --- a/src/module/item/class/data.ts +++ b/src/module/item/class/data.ts @@ -2,7 +2,7 @@ import { AttributeString, SaveType } from "@actor/types.ts"; import { ABCSystemSource } from "@item/abc/data.ts"; import { BaseItemSourcePF2e, ItemTraits } from "@item/data/base.ts"; import { ZeroToFour } from "@module/data.ts"; -import { CLASS_TRAITS } from "./values.ts"; +import type { CLASS_TRAITS } from "./values.ts"; type ClassSource = BaseItemSourcePF2e<"class", ClassSystemSource>; @@ -46,4 +46,4 @@ interface ClassDefenseProficiencies { type ClassTrait = SetElement; -export { ClassAttackProficiencies, ClassDefenseProficiencies, ClassSource, ClassSystemData, ClassTrait }; +export type { ClassAttackProficiencies, ClassDefenseProficiencies, ClassSource, ClassSystemData, ClassTrait }; diff --git a/src/module/item/condition/data.ts b/src/module/item/condition/data.ts index 396eb2eade7..623ea48f009 100644 --- a/src/module/item/condition/data.ts +++ b/src/module/item/condition/data.ts @@ -1,7 +1,7 @@ import { AbstractEffectSystemData, AbstractEffectSystemSource } from "@item/abstract-effect/data.ts"; import { BaseItemSourcePF2e } from "@item/data/base.ts"; import { DamageType } from "@system/damage/index.ts"; -import { DamageRoll } from "@system/damage/roll.ts"; +import type { DamageRoll } from "@system/damage/roll.ts"; import { ConditionSlug } from "./types.ts"; type ConditionSource = BaseItemSourcePF2e<"condition", ConditionSystemSource>; @@ -46,4 +46,4 @@ interface PersistentDamageData extends PersistentSourceData { type ConditionValueData = { isValued: true; value: number } | { isValued: false; value: null }; -export { ConditionSource, ConditionSystemData, ConditionSystemSource, PersistentDamageData, PersistentSourceData }; +export type { ConditionSource, ConditionSystemData, ConditionSystemSource, PersistentDamageData, PersistentSourceData }; diff --git a/src/module/item/condition/document.ts b/src/module/item/condition/document.ts index cf9c53ec2f2..2c481ad37ac 100644 --- a/src/module/item/condition/document.ts +++ b/src/module/item/condition/document.ts @@ -1,11 +1,11 @@ -import { ActorPF2e } from "@actor"; -import { ItemPF2e } from "@item"; +import type { ActorPF2e } from "@actor"; +import type { ItemPF2e } from "@item"; import { AbstractEffectPF2e, EffectBadge } from "@item/abstract-effect/index.ts"; import { reduceItemName } from "@item/helpers.ts"; import { ChatMessagePF2e } from "@module/chat-message/index.ts"; import { RuleElementOptions, RuleElementPF2e } from "@module/rules/index.ts"; -import { UserPF2e } from "@module/user/index.ts"; -import { TokenDocumentPF2e } from "@scene/index.ts"; +import type { UserPF2e } from "@module/user/index.ts"; +import type { TokenDocumentPF2e } from "@scene/index.ts"; import { DamageCategorization } from "@system/damage/helpers.ts"; import { DamageRoll } from "@system/damage/roll.ts"; import { PERSISTENT_DAMAGE_IMAGES } from "@system/damage/values.ts"; @@ -306,4 +306,5 @@ interface ConditionModificationContext extends conditionValue?: number | null; } -export { ConditionModificationContext, ConditionPF2e, PersistentDamagePF2e }; +export { ConditionPF2e }; +export type { ConditionModificationContext, PersistentDamagePF2e }; diff --git a/src/module/item/condition/types.ts b/src/module/item/condition/types.ts index 92c0a0525e8..5dfd6212d89 100644 --- a/src/module/item/condition/types.ts +++ b/src/module/item/condition/types.ts @@ -1,7 +1,7 @@ -import { CONDITION_SLUGS } from "./values.ts"; +import type { CONDITION_SLUGS } from "./values.ts"; type ConditionSlug = SetElement; type DetectionConditionType = Extract; type ConditionKey = ConditionSlug | `persistent-damage-${string}`; -export { DetectionConditionType, ConditionSlug, ConditionKey }; +export type { DetectionConditionType, ConditionSlug, ConditionKey }; diff --git a/src/module/item/consumable/data.ts b/src/module/item/consumable/data.ts index 01d7a50bcd8..dd2f71978f2 100644 --- a/src/module/item/consumable/data.ts +++ b/src/module/item/consumable/data.ts @@ -38,4 +38,4 @@ interface ConsumableSystemData extends Omit, Omit {} -export { ConsumableCategory, ConsumableSource, ConsumableSystemData, ConsumableSystemSource, ConsumableTrait }; +export type { ConsumableCategory, ConsumableSource, ConsumableSystemData, ConsumableSystemSource, ConsumableTrait }; diff --git a/src/module/item/consumable/spell-consumables.ts b/src/module/item/consumable/spell-consumables.ts index 16822e5238b..97440935d52 100644 --- a/src/module/item/consumable/spell-consumables.ts +++ b/src/module/item/consumable/spell-consumables.ts @@ -1,4 +1,4 @@ -import { ConsumablePF2e, SpellPF2e } from "@item"; +import { ConsumablePF2e, type SpellPF2e } from "@item"; import { ConsumableSource } from "@item/data/index.ts"; import { MagicTradition } from "@item/spell/types.ts"; import { MAGIC_TRADITIONS } from "@item/spell/values.ts"; @@ -136,10 +136,5 @@ function calculateTrickMagicItemCheckDC( return Object.fromEntries(skills); } -export { - SpellConsumableItemType, - TrickMagicItemDifficultyData, - calculateTrickMagicItemCheckDC, - createConsumableFromSpell, - isSpellConsumable, -}; +export { calculateTrickMagicItemCheckDC, createConsumableFromSpell, isSpellConsumable }; +export type { SpellConsumableItemType, TrickMagicItemDifficultyData }; diff --git a/src/module/item/consumable/types.ts b/src/module/item/consumable/types.ts index 0ff7e04413a..54ba7b85925 100644 --- a/src/module/item/consumable/types.ts +++ b/src/module/item/consumable/types.ts @@ -1,4 +1,4 @@ type ConsumableTrait = keyof ConfigPF2e["PF2E"]["consumableTraits"]; type OtherConsumableTag = "herbal"; -export { ConsumableTrait, OtherConsumableTag }; +export type { ConsumableTrait, OtherConsumableTag }; diff --git a/src/module/item/container/data.ts b/src/module/item/container/data.ts index 43b19f4d6d7..983329f7e0f 100644 --- a/src/module/item/container/data.ts +++ b/src/module/item/container/data.ts @@ -24,4 +24,4 @@ interface ContainerSystemData extends Omit, Omit, "traits"> {} -export { ContainerSource, ContainerSystemData }; +export type { ContainerSource, ContainerSystemData }; diff --git a/src/module/item/data/base.ts b/src/module/item/data/base.ts index 7e4898b897c..27e20700377 100644 --- a/src/module/item/data/base.ts +++ b/src/module/item/data/base.ts @@ -88,7 +88,7 @@ interface Frequency extends FrequencySource { value: number; } -export { +export type { ActionCost, ActionType, BaseItemSourcePF2e, diff --git a/src/module/item/data/index.ts b/src/module/item/data/index.ts index 49740fb24ab..190a5bf5313 100644 --- a/src/module/item/data/index.ts +++ b/src/module/item/data/index.ts @@ -95,7 +95,7 @@ interface TraitChatData { excluded?: boolean; } -export { +export type { AbilityItemSource, AncestrySource, ArmorSource, diff --git a/src/module/item/deity/data.ts b/src/module/item/deity/data.ts index e4a1d1d8533..56312b3fc57 100644 --- a/src/module/item/deity/data.ts +++ b/src/module/item/deity/data.ts @@ -30,4 +30,4 @@ type DivineFonts = ["harm"] | ["heal"] | ["harm", "heal"] | never[]; type DeitySystemData = DeitySystemSource; -export { DeitySource, DeitySystemData, DeitySystemSource }; +export type { DeitySource, DeitySystemData, DeitySystemSource }; diff --git a/src/module/item/deity/index.ts b/src/module/item/deity/index.ts index 5356763587e..b315012177f 100644 --- a/src/module/item/deity/index.ts +++ b/src/module/item/deity/index.ts @@ -1,3 +1,3 @@ export { DeityPF2e } from "./document.ts"; export { DeitySheetPF2e } from "./sheet.ts"; -export { DeitySource } from "./data.ts"; +export type { DeitySource } from "./data.ts"; diff --git a/src/module/item/deity/types.ts b/src/module/item/deity/types.ts index c8010109809..3de2d8d4be6 100644 --- a/src/module/item/deity/types.ts +++ b/src/module/item/deity/types.ts @@ -2,4 +2,4 @@ import type enJSON from "../../../../static/lang/en.json"; type DeityDomain = Lowercase; -export { DeityDomain }; +export type { DeityDomain }; diff --git a/src/module/item/effect/data.ts b/src/module/item/effect/data.ts index 425bda7651a..21cfc9e9b77 100644 --- a/src/module/item/effect/data.ts +++ b/src/module/item/effect/data.ts @@ -54,4 +54,4 @@ interface EffectSystemData type EffectExpiryType = "turn-start" | "turn-end"; -export { EffectExpiryType, EffectFlags, EffectSource, EffectSystemData }; +export type { EffectExpiryType, EffectFlags, EffectSource, EffectSystemData }; diff --git a/src/module/item/equipment/data.ts b/src/module/item/equipment/data.ts index 42b6767fe39..5907b307d7a 100644 --- a/src/module/item/equipment/data.ts +++ b/src/module/item/equipment/data.ts @@ -36,4 +36,4 @@ interface EquipmentTraits extends PhysicalItemTraits { otherTags: OtherEquipmentTag[]; } -export { EquipmentSource, EquipmentSystemData, EquipmentSystemSource, EquipmentTrait }; +export type { EquipmentSource, EquipmentSystemData, EquipmentSystemSource, EquipmentTrait }; diff --git a/src/module/item/equipment/types.ts b/src/module/item/equipment/types.ts index e54d11d91c4..55c09178d3d 100644 --- a/src/module/item/equipment/types.ts +++ b/src/module/item/equipment/types.ts @@ -1,4 +1,4 @@ type EquipmentTrait = keyof ConfigPF2e["PF2E"]["equipmentTraits"]; type OtherEquipmentTag = "implement"; -export { EquipmentTrait, OtherEquipmentTag }; +export type { EquipmentTrait, OtherEquipmentTag }; diff --git a/src/module/item/feat/data.ts b/src/module/item/feat/data.ts index d9b8c29892c..20e50a4cbac 100644 --- a/src/module/item/feat/data.ts +++ b/src/module/item/feat/data.ts @@ -50,4 +50,4 @@ interface FeatSubfeatures { type FeatTraits = TraitsWithRarity; -export { FeatSource, FeatSystemData, FeatSystemSource, FeatTraits, PrerequisiteTagData }; +export type { FeatSource, FeatSystemData, FeatSystemSource, FeatTraits, PrerequisiteTagData }; diff --git a/src/module/item/feat/types.ts b/src/module/item/feat/types.ts index f4660e5e21f..e98c186a7cd 100644 --- a/src/module/item/feat/types.ts +++ b/src/module/item/feat/types.ts @@ -1,6 +1,6 @@ -import { FEAT_CATEGORIES } from "./values.ts"; +import type { FEAT_CATEGORIES } from "./values.ts"; type FeatCategory = SetElement; type FeatTrait = keyof ConfigPF2e["PF2E"]["featTraits"]; -export { FeatCategory, FeatTrait }; +export type { FeatCategory, FeatTrait }; diff --git a/src/module/item/heritage/data.ts b/src/module/item/heritage/data.ts index c37861ab7b0..8adf004928e 100644 --- a/src/module/item/heritage/data.ts +++ b/src/module/item/heritage/data.ts @@ -15,4 +15,4 @@ interface HeritageSystemSource extends ItemSystemData { export type HeritageSystemData = HeritageSystemSource; -export { HeritageSource, HeritageSystemSource }; +export type { HeritageSource, HeritageSystemSource }; diff --git a/src/module/item/kit/data.ts b/src/module/item/kit/data.ts index d97ef22d502..37d151c9c8c 100644 --- a/src/module/item/kit/data.ts +++ b/src/module/item/kit/data.ts @@ -21,4 +21,4 @@ interface KitSystemSource extends ItemSystemSource { type KitSystemData = KitSystemSource; -export { KitEntryData, KitSource, KitSystemData, KitSystemSource }; +export type { KitEntryData, KitSource, KitSystemData, KitSystemSource }; diff --git a/src/module/item/lore/data.ts b/src/module/item/lore/data.ts index 6903fa5b8b3..92dfc642f60 100644 --- a/src/module/item/lore/data.ts +++ b/src/module/item/lore/data.ts @@ -17,4 +17,4 @@ interface LoreSystemSource extends ItemSystemSource { type LoreSystemData = LoreSystemSource; -export { LoreSource, LoreSystemData }; +export type { LoreSource, LoreSystemData }; diff --git a/src/module/item/melee/data.ts b/src/module/item/melee/data.ts index f5de6f1b421..1f671b65852 100644 --- a/src/module/item/melee/data.ts +++ b/src/module/item/melee/data.ts @@ -45,4 +45,4 @@ type NPCAttackDamage = Required; export type NPCAttackTrait = keyof ConfigPF2e["PF2E"]["npcAttackTraits"]; export type NPCAttackTraits = ItemTraits; -export { MeleeFlags, MeleeSource, MeleeSystemData, MeleeSystemSource, NPCAttackDamage }; +export type { MeleeFlags, MeleeSource, MeleeSystemData, MeleeSystemSource, NPCAttackDamage }; diff --git a/src/module/item/physical/data.ts b/src/module/item/physical/data.ts index 591e491df11..a69edb45c5f 100644 --- a/src/module/item/physical/data.ts +++ b/src/module/item/physical/data.ts @@ -6,7 +6,7 @@ import { WeaponTrait } from "@item/weapon/types.ts"; import { Size, TraitsWithRarity, ValuesList } from "@module/data.ts"; import { ActionCost, BaseItemSourcePF2e, Frequency, ItemSystemData, ItemSystemSource } from "../data/base.ts"; import type { ITEM_CARRY_TYPES } from "../data/values.ts"; -import { CoinsPF2e } from "./helpers.ts"; +import type { CoinsPF2e } from "./helpers.ts"; import { PhysicalItemType, PreciousMaterialGrade, PreciousMaterialType } from "./types.ts"; import { UsageDetails } from "./usage.ts"; @@ -163,7 +163,7 @@ interface Price extends PartialPrice { per: number; } -export { +export type { BasePhysicalItemSource, Coins, EquippedData, diff --git a/src/module/item/physical/materials.ts b/src/module/item/physical/materials.ts index 717bab7f9fc..9c0ea9b7a64 100644 --- a/src/module/item/physical/materials.ts +++ b/src/module/item/physical/materials.ts @@ -493,4 +493,5 @@ const ARMOR_MATERIAL_VALUATION_DATA: MaterialValuationData = { }, }; -export { ARMOR_MATERIAL_VALUATION_DATA, MaterialGradeData, MaterialValuationData, WEAPON_MATERIAL_VALUATION_DATA }; +export { ARMOR_MATERIAL_VALUATION_DATA, WEAPON_MATERIAL_VALUATION_DATA }; +export type { MaterialGradeData, MaterialValuationData }; diff --git a/src/module/item/physical/runes.ts b/src/module/item/physical/runes.ts index 94fdf866b68..8edf02c84df 100644 --- a/src/module/item/physical/runes.ts +++ b/src/module/item/physical/runes.ts @@ -1,7 +1,7 @@ import { AutomaticBonusProgression as ABP } from "@actor/character/automatic-bonus-progression.ts"; import { DamageDicePF2e, DamageDiceParameters, ModifierAdjustment } from "@actor/modifiers.ts"; import { ResistanceType } from "@actor/types.ts"; -import { ArmorPF2e, MeleePF2e, WeaponPF2e } from "@item"; +import type { ArmorPF2e, MeleePF2e, WeaponPF2e } from "@item"; import type { ResilientRuneType } from "@item/armor/types.ts"; import type { OtherWeaponTag, @@ -1284,9 +1284,7 @@ const WEAPON_VALUATION_DATA: WeaponValuationData = { }; export { - RuneValuationData, WEAPON_VALUATION_DATA, - WeaponPropertyRuneData, getPropertyRuneDice, getPropertyRuneModifierAdjustments, getPropertyRuneStrikeAdjustments, @@ -1294,4 +1292,6 @@ export { getPropertySlots, getResilientBonus, getStrikingDice, + type RuneValuationData, + type WeaponPropertyRuneData, }; diff --git a/src/module/item/physical/sheet.ts b/src/module/item/physical/sheet.ts index b105a9dad5d..05e14f4155d 100644 --- a/src/module/item/physical/sheet.ts +++ b/src/module/item/physical/sheet.ts @@ -255,4 +255,5 @@ interface MaterialSheetData { materials: Record; } -export { MaterialSheetData, MaterialSheetEntry, PhysicalItemSheetData, PhysicalItemSheetPF2e }; +export { PhysicalItemSheetPF2e }; +export type { MaterialSheetData, MaterialSheetEntry, PhysicalItemSheetData }; diff --git a/src/module/item/physical/types.ts b/src/module/item/physical/types.ts index 7a1e5633992..357b274f445 100644 --- a/src/module/item/physical/types.ts +++ b/src/module/item/physical/types.ts @@ -11,4 +11,4 @@ type PhysicalItemType = SetElement; type PreciousMaterialType = SetElement; type PreciousMaterialGrade = SetElement; -export { BaseMaterial, CoinDenomination, PhysicalItemType, PreciousMaterialGrade, PreciousMaterialType }; +export type { BaseMaterial, CoinDenomination, PhysicalItemType, PreciousMaterialGrade, PreciousMaterialType }; diff --git a/src/module/item/physical/usage.ts b/src/module/item/physical/usage.ts index 896ea33887e..e15d01b9adb 100644 --- a/src/module/item/physical/usage.ts +++ b/src/module/item/physical/usage.ts @@ -91,4 +91,5 @@ function getUsageDetails(usage: string): UsageDetails { return { value: usage, type: "worn" }; } -export { UsageDetails, UsageType, getUsageDetails, isEquipped }; +export { getUsageDetails, isEquipped }; +export type { UsageDetails, UsageType }; diff --git a/src/module/item/sheet/data-types.ts b/src/module/item/sheet/data-types.ts index 310aee96ae4..c2c97450100 100644 --- a/src/module/item/sheet/data-types.ts +++ b/src/module/item/sheet/data-types.ts @@ -45,4 +45,4 @@ interface ItemSheetDataPF2e extends ItemSheetData proficiencies: ConfigPF2e["PF2E"]["proficiencyLevels"]; } -export { ItemSheetDataPF2e }; +export type { ItemSheetDataPF2e }; diff --git a/src/module/item/sheet/rule-elements/base.ts b/src/module/item/sheet/rule-elements/base.ts index 926000a4121..d84b28ee487 100644 --- a/src/module/item/sheet/rule-elements/base.ts +++ b/src/module/item/sheet/rule-elements/base.ts @@ -71,4 +71,4 @@ type RuleElementFormSheetData< TObject extends RuleElementPF2e > = RuleElementFormOptions; -export { RuleElementForm, RuleElementFormSheetData, coerceNumber }; +export { RuleElementForm, coerceNumber, type RuleElementFormSheetData }; diff --git a/src/module/item/spell/data.ts b/src/module/item/spell/data.ts index 05bcc5c4c27..d4b9700f25a 100644 --- a/src/module/item/spell/data.ts +++ b/src/module/item/spell/data.ts @@ -123,4 +123,4 @@ interface SpellOverlayDamage { type SpellOverlay = SpellOverlayOverride | SpellOverlayDamage; type SpellOverlayType = SpellOverlay["overlayType"]; -export { SpellSource, SpellSystemData, SpellSystemSource, SpellOverlay, SpellOverlayOverride, SpellOverlayType }; +export type { SpellSource, SpellSystemData, SpellSystemSource, SpellOverlay, SpellOverlayOverride, SpellOverlayType }; diff --git a/src/module/item/spell/document.ts b/src/module/item/spell/document.ts index 562f69c3c02..dc7cd3ac9cf 100644 --- a/src/module/item/spell/document.ts +++ b/src/module/item/spell/document.ts @@ -1005,4 +1005,4 @@ interface SpellDamageOptions { target?: ActorPF2e | null; } -export { SpellPF2e, SpellToMessageOptions }; +export { SpellPF2e, type SpellToMessageOptions }; diff --git a/src/module/item/spell/types.ts b/src/module/item/spell/types.ts index f2d5f306a5b..985fb9d9775 100644 --- a/src/module/item/spell/types.ts +++ b/src/module/item/spell/types.ts @@ -1,4 +1,4 @@ -import { MAGIC_SCHOOLS, MAGIC_TRADITIONS, SPELL_COMPONENTS } from "./values.ts"; +import type { MAGIC_SCHOOLS, MAGIC_TRADITIONS, SPELL_COMPONENTS } from "./values.ts"; type MagicSchool = SetElement; type MagicTradition = SetElement; @@ -8,4 +8,4 @@ type SpellTrait = keyof ConfigPF2e["PF2E"]["spellTraits"] | MagicSchool | MagicT type EffectAreaSize = keyof ConfigPF2e["PF2E"]["areaSizes"]; type EffectAreaType = keyof ConfigPF2e["PF2E"]["areaTypes"]; -export { EffectAreaSize, EffectAreaType, MagicSchool, MagicTradition, SpellComponent, SpellTrait }; +export type { EffectAreaSize, EffectAreaType, MagicSchool, MagicTradition, SpellComponent, SpellTrait }; diff --git a/src/module/item/spellcasting-entry/data.ts b/src/module/item/spellcasting-entry/data.ts index ef34526e6df..38bbf42a9bb 100644 --- a/src/module/item/spellcasting-entry/data.ts +++ b/src/module/item/spellcasting-entry/data.ts @@ -2,7 +2,7 @@ import { AttributeString } from "@actor/types.ts"; import { BaseItemSourcePF2e, ItemSystemData, ItemSystemSource } from "@item/data/base.ts"; import { MagicTradition } from "@item/spell/types.ts"; import { OneToTen, ZeroToEleven, ZeroToFour } from "@module/data.ts"; -import { RollNotePF2e } from "@module/notes.ts"; +import type { RollNotePF2e } from "@module/notes.ts"; import { SpellcastingCategory } from "./types.ts"; // temporary type until the spellcasting entry is migrated to no longer use slotX keys @@ -74,7 +74,7 @@ interface SpellCollectionTypeData extends SpellCollectionTypeSource { validItems: "scroll" | null; } -export { +export type { SlotKey, SpellAttackRollModifier, SpellDifficultyClass, diff --git a/src/module/item/spellcasting-entry/trick.ts b/src/module/item/spellcasting-entry/trick.ts index d97e307b33e..a91751a1dbc 100644 --- a/src/module/item/spellcasting-entry/trick.ts +++ b/src/module/item/spellcasting-entry/trick.ts @@ -175,4 +175,5 @@ class TrickMagicItemEntry implements Spell } } -export { TRICK_MAGIC_SKILLS, TrickMagicItemEntry, TrickMagicItemSkill, traditionSkills }; +export { TRICK_MAGIC_SKILLS, TrickMagicItemEntry, traditionSkills }; +export type { TrickMagicItemSkill }; diff --git a/src/module/item/spellcasting-entry/types.ts b/src/module/item/spellcasting-entry/types.ts index 07b38868997..bdc41116854 100644 --- a/src/module/item/spellcasting-entry/types.ts +++ b/src/module/item/spellcasting-entry/types.ts @@ -107,7 +107,7 @@ interface ActiveSpell { virtual?: boolean; } -export { +export type { ActiveSpell, BaseSpellcastingEntry, CastOptions, diff --git a/src/module/item/treasure/data.ts b/src/module/item/treasure/data.ts index 68256b12a43..9ea4e0922b2 100644 --- a/src/module/item/treasure/data.ts +++ b/src/module/item/treasure/data.ts @@ -9,4 +9,4 @@ type TreasureSystemData = PhysicalSystemData & { }; }; -export { TreasureSource, TreasureSystemData, TreasureSystemSource }; +export type { TreasureSource, TreasureSystemData, TreasureSystemSource }; diff --git a/src/module/item/types.ts b/src/module/item/types.ts index 5d61a16b6f7..b8de83d065e 100644 --- a/src/module/item/types.ts +++ b/src/module/item/types.ts @@ -33,4 +33,4 @@ type RangeData = { max: number; }; -export { ItemInstances, RangeData }; +export type { ItemInstances, RangeData }; diff --git a/src/module/item/weapon/data.ts b/src/module/item/weapon/data.ts index 7e7247ebcf8..4211312c00c 100644 --- a/src/module/item/weapon/data.ts +++ b/src/module/item/weapon/data.ts @@ -199,7 +199,7 @@ interface ComboWeaponMeleeUsage { traitToggles?: { modular: DamageType | null; versatile: DamageType | null }; } -export { +export type { ComboWeaponMeleeUsage, WeaponDamage, WeaponFlags, diff --git a/src/module/item/weapon/types.ts b/src/module/item/weapon/types.ts index c42797b6488..9ddc1056e99 100644 --- a/src/module/item/weapon/types.ts +++ b/src/module/item/weapon/types.ts @@ -25,7 +25,7 @@ type StrikingRuneType = "striking" | "greaterStriking" | "majorStriking"; type WeaponMaterialType = Exclude; -export { +export type { BaseWeaponType, MeleeWeaponGroup, OtherWeaponTag, diff --git a/src/module/notes.ts b/src/module/notes.ts index 9d005a1bb09..719f94f6e61 100644 --- a/src/module/notes.ts +++ b/src/module/notes.ts @@ -1,8 +1,8 @@ import { UserVisibility } from "@scripts/ui/user-visibility.ts"; import { DegreeOfSuccessString } from "@system/degree-of-success.ts"; -import { PredicatePF2e, RawPredicate } from "@system/predication.ts"; +import { RawPredicate, PredicatePF2e } from "@system/predication.ts"; import { createHTMLElement } from "@util"; -import { RuleElementPF2e } from "./rules/index.ts"; +import type { RuleElementPF2e } from "./rules/index.ts"; class RollNotePF2e { /** The selector used to determine on which rolls the note will be shown for. */ @@ -89,4 +89,4 @@ interface RollNoteParams extends RollNoteSource { rule?: RuleElementPF2e | null; } -export { RollNotePF2e, RollNoteSource }; +export { RollNotePF2e, type RollNoteSource }; diff --git a/src/module/recall-knowledge.ts b/src/module/recall-knowledge.ts index 0a457cb3b2f..9af3497fbf0 100644 --- a/src/module/recall-knowledge.ts +++ b/src/module/recall-knowledge.ts @@ -82,4 +82,4 @@ interface CreatureIdentificationData { lore: [RecallKnowledgeDC, RecallKnowledgeDC]; } -export { CreatureIdentificationData, creatureIdentificationDCs }; +export { creatureIdentificationDCs, type CreatureIdentificationData }; diff --git a/src/module/rules/rule-element/ae-like.ts b/src/module/rules/rule-element/ae-like.ts index f491535ce58..f484763c187 100644 --- a/src/module/rules/rule-element/ae-like.ts +++ b/src/module/rules/rule-element/ae-like.ts @@ -283,4 +283,5 @@ interface AELikeSource extends RuleElementSource { phase?: unknown; } -export { AELikeChangeMode, AELikeDataPrepPhase, AELikeRuleElement, AELikeSchema, AELikeSource, AutoChangeEntry }; +export { AELikeRuleElement }; +export type { AELikeChangeMode, AELikeDataPrepPhase, AELikeSchema, AELikeSource, AutoChangeEntry }; diff --git a/src/module/rules/rule-element/base.ts b/src/module/rules/rule-element/base.ts index 9f2f537e007..b82ef7a1005 100644 --- a/src/module/rules/rule-element/base.ts +++ b/src/module/rules/rule-element/base.ts @@ -496,4 +496,4 @@ type RuleElementOptions = { suppressWarnings?: boolean; }; -export { RuleElementOptions, RuleElementPF2e }; +export { RuleElementPF2e, type RuleElementOptions }; diff --git a/src/module/rules/rule-element/battle-form/schema.ts b/src/module/rules/rule-element/battle-form/schema.ts index 1c32b7a8938..b4bcc7d88ee 100644 --- a/src/module/rules/rule-element/battle-form/schema.ts +++ b/src/module/rules/rule-element/battle-form/schema.ts @@ -61,4 +61,4 @@ type BattleFormRuleSchema = RuleElementSchema & { ownUnarmed: BooleanField; }; -export { BattleFormRuleSchema, BattleFormRuleOverrideSchema }; +export type { BattleFormRuleSchema, BattleFormRuleOverrideSchema }; diff --git a/src/module/rules/rule-element/battle-form/types.ts b/src/module/rules/rule-element/battle-form/types.ts index 50368cdf9b4..ef066c0b199 100644 --- a/src/module/rules/rule-element/battle-form/types.ts +++ b/src/module/rules/rule-element/battle-form/types.ts @@ -73,7 +73,7 @@ interface BattleFormStrikeQuery { ownIfHigher: boolean; } -export { +export type { BattleFormAC, BattleFormOverrides, BattleFormSenses, diff --git a/src/module/rules/rule-element/choice-set/data.ts b/src/module/rules/rule-element/choice-set/data.ts index 5369c7ba2be..4d720c44792 100644 --- a/src/module/rules/rule-element/choice-set/data.ts +++ b/src/module/rules/rule-element/choice-set/data.ts @@ -90,7 +90,7 @@ interface ChoiceSetPackQuery { unarmedAttacks?: never; } -export { +export type { ChoiceSetAttacks, ChoiceSetOwnedItems, ChoiceSetPackQuery, diff --git a/src/module/rules/rule-element/crafting/entry.ts b/src/module/rules/rule-element/crafting/entry.ts index 17f714c9492..cc97746a5cb 100644 --- a/src/module/rules/rule-element/crafting/entry.ts +++ b/src/module/rules/rule-element/crafting/entry.ts @@ -1,8 +1,8 @@ -import { CharacterPF2e } from "@actor"; +import type { CharacterPF2e } from "@actor"; import { ActorType } from "@actor/data/index.ts"; import { PredicatePF2e } from "@system/predication.ts"; +import { PredicateField } from "@system/schema-data-fields.ts"; import { sluggify } from "@util"; -import { RuleElementOptions, RuleElementPF2e, RuleElementSchema, RuleElementSource } from "../index.ts"; import type { ArrayField, BooleanField, @@ -10,8 +10,8 @@ import type { SchemaField, StringField, } from "types/foundry/common/data/fields.d.ts"; -import { PredicateField } from "@system/schema-data-fields.ts"; import { ResolvableValueField } from "../data.ts"; +import { RuleElementOptions, RuleElementPF2e, RuleElementSchema, RuleElementSource } from "../index.ts"; /** * @category RuleElement @@ -120,4 +120,5 @@ interface CraftingEntryRuleSource extends RuleElementSource { preparedFormulas?: unknown; } -export { CraftingEntryRuleData, CraftingEntryRuleElement, CraftingEntryRuleSource }; +export { CraftingEntryRuleElement }; +export type { CraftingEntryRuleData, CraftingEntryRuleSource }; diff --git a/src/module/rules/rule-element/data.ts b/src/module/rules/rule-element/data.ts index bb655134d9d..762b555119b 100644 --- a/src/module/rules/rule-element/data.ts +++ b/src/module/rules/rule-element/data.ts @@ -72,4 +72,5 @@ class ResolvableValueField< } } -export { Bracket, BracketedValue, ResolvableValueField, RuleElementSchema, RuleElementSource, RuleValue }; +export { ResolvableValueField }; +export type { Bracket, BracketedValue, RuleElementSchema, RuleElementSource, RuleValue }; diff --git a/src/module/rules/rule-element/fast-healing.ts b/src/module/rules/rule-element/fast-healing.ts index a22a732ab87..9302d82e818 100644 --- a/src/module/rules/rule-element/fast-healing.ts +++ b/src/module/rules/rule-element/fast-healing.ts @@ -2,9 +2,9 @@ import { ActorType } from "@actor/data/index.ts"; import { ChatMessagePF2e } from "@module/chat-message/index.ts"; import { DamageRoll } from "@system/damage/roll.ts"; import { localizeList, objectHasKey } from "@util"; -import { RuleElementPF2e, RuleElementSchema } from "./index.ts"; import type { ArrayField, StringField } from "types/foundry/common/data/fields.d.ts"; import { ResolvableValueField } from "./data.ts"; +import { RuleElementPF2e, RuleElementSchema } from "./index.ts"; /** * Rule element to implement fast healing and regeneration. @@ -100,4 +100,5 @@ type FastHealingType = "fast-healing" | "regeneration"; type FastHealingSource = SourceFromSchema; -export { FastHealingRuleElement, FastHealingSource, FastHealingType }; +export { FastHealingRuleElement }; +export type { FastHealingSource, FastHealingType }; diff --git a/src/module/rules/rule-element/flat-modifier.ts b/src/module/rules/rule-element/flat-modifier.ts index 4a7e906d1f8..b9220de2a0d 100644 --- a/src/module/rules/rule-element/flat-modifier.ts +++ b/src/module/rules/rule-element/flat-modifier.ts @@ -236,4 +236,4 @@ interface FlatModifierSource extends RuleElementSource { hideIfDisabled?: unknown; } -export { FlatModifierRuleElement, FlatModifierSource }; +export { FlatModifierRuleElement, type FlatModifierSource }; diff --git a/src/module/rules/rule-element/grant-item/rule-element.ts b/src/module/rules/rule-element/grant-item/rule-element.ts index 4289ae51e53..1eaa0a9840e 100644 --- a/src/module/rules/rule-element/grant-item/rule-element.ts +++ b/src/module/rules/rule-element/grant-item/rule-element.ts @@ -408,4 +408,4 @@ interface OnDeleteActions { grantee: ItemGrantDeleteAction; } -export { GrantItemRuleElement, GrantItemSource }; +export { GrantItemRuleElement, type GrantItemSource }; diff --git a/src/module/rules/rule-element/grant-item/schema.ts b/src/module/rules/rule-element/grant-item/schema.ts index ac97ec4b5e5..0f160842d99 100644 --- a/src/module/rules/rule-element/grant-item/schema.ts +++ b/src/module/rules/rule-element/grant-item/schema.ts @@ -28,4 +28,4 @@ type GrantItemSchema = RuleElementSchema & { track: BooleanField; }; -export { GrantItemSchema }; +export type { GrantItemSchema }; diff --git a/src/module/rules/rule-element/item-alteration/alteration.ts b/src/module/rules/rule-element/item-alteration/alteration.ts index 90ac3a5568d..5b999fdc3f5 100644 --- a/src/module/rules/rule-element/item-alteration/alteration.ts +++ b/src/module/rules/rule-element/item-alteration/alteration.ts @@ -5,13 +5,13 @@ import { FrequencyInterval } from "@item/data/base.ts"; import { ItemSourcePF2e, PhysicalItemSource } from "@item/data/index.ts"; import { itemIsOfType } from "@item/helpers.ts"; import { isObject, objectHasKey } from "@util"; +import { Duration } from "luxon"; import type { StringField } from "types/foundry/common/data/fields.d.ts"; import type { DataModelValidationFailure } from "types/foundry/common/data/validation-failure.d.ts"; import { AELikeChangeMode, AELikeRuleElement } from "../ae-like.ts"; import { RuleElementPF2e } from "../base.ts"; import { ResolvableValueField } from "../data.ts"; import { ITEM_ALTERATION_VALIDATORS } from "./schemas.ts"; -import { Duration } from "luxon"; class ItemAlteration extends foundry.abstract.DataModel { static VALID_PROPERTIES = [ @@ -265,4 +265,5 @@ type ItemAlterationSchema = { type ItemAlterationProperty = (typeof ItemAlteration.VALID_PROPERTIES)[number]; -export { ItemAlteration, ItemAlterationProperty, ItemAlterationSchema }; +export { ItemAlteration }; +export type { ItemAlterationProperty, ItemAlterationSchema }; diff --git a/src/module/rules/rule-element/iwr/base.ts b/src/module/rules/rule-element/iwr/base.ts index edef94e8cf2..b51d0df2d26 100644 --- a/src/module/rules/rule-element/iwr/base.ts +++ b/src/module/rules/rule-element/iwr/base.ts @@ -117,4 +117,5 @@ interface IWRRuleElementSource extends RuleElementSource { override?: unknown; } -export { IWRRuleElement, IWRRuleElementSource, IWRRuleSchema }; +export { IWRRuleElement }; +export type { IWRRuleElementSource, IWRRuleSchema }; diff --git a/src/module/rules/rule-element/roll-note.ts b/src/module/rules/rule-element/roll-note.ts index 78ba26d88d9..bb8babdcf6e 100644 --- a/src/module/rules/rule-element/roll-note.ts +++ b/src/module/rules/rule-element/roll-note.ts @@ -89,4 +89,4 @@ interface RollNoteSource extends RuleElementSource { visibility?: unknown; } -export { RollNoteRuleElement, RollNoteSource }; +export { RollNoteRuleElement, type RollNoteSource }; diff --git a/src/module/rules/synthetics.ts b/src/module/rules/synthetics.ts index ff0d118ea81..26826f80938 100644 --- a/src/module/rules/synthetics.ts +++ b/src/module/rules/synthetics.ts @@ -143,7 +143,7 @@ interface PotencySynthetic { property?: WeaponPropertyRuneType[]; } -export { +export type { BaseSpeedSynthetic, CritSpecEffect, DamageDiceSynthetics, diff --git a/src/module/scene/data.ts b/src/module/scene/data.ts index 72ffbb49ea2..d8a19bf4179 100644 --- a/src/module/scene/data.ts +++ b/src/module/scene/data.ts @@ -17,4 +17,5 @@ enum LightLevels { type LightLevel = ZeroToTwo; -export { LightLevel, LightLevels, SceneFlagsPF2e }; +export { LightLevels }; +export type { LightLevel, SceneFlagsPF2e }; diff --git a/src/module/scene/token-document/aura/types.ts b/src/module/scene/token-document/aura/types.ts index e9d62030559..63b387d0a44 100644 --- a/src/module/scene/token-document/aura/types.ts +++ b/src/module/scene/token-document/aura/types.ts @@ -19,4 +19,4 @@ interface TokenAuraData { traits: Set; } -export { TokenAuraData }; +export type { TokenAuraData }; diff --git a/src/module/scene/token-document/data.ts b/src/module/scene/token-document/data.ts index a14f0b8492c..6bf7a4da06e 100644 --- a/src/module/scene/token-document/data.ts +++ b/src/module/scene/token-document/data.ts @@ -7,4 +7,4 @@ interface TokenFlagsPF2e extends DocumentFlags { [key: string]: Record; } -export { TokenFlagsPF2e }; +export type { TokenFlagsPF2e }; diff --git a/src/module/sheet/helpers.ts b/src/module/sheet/helpers.ts index f6eb7919ba5..f1c0461cdd5 100644 --- a/src/module/sheet/helpers.ts +++ b/src/module/sheet/helpers.ts @@ -103,13 +103,5 @@ interface TraitTagifyEntry { readonly: boolean; } -export { - SheetOption, - SheetOptions, - TraitTagifyEntry, - createSheetOptions, - createSheetTags, - createTagifyTraits, - maintainFocusInRender, - processTagifyInSubmitData, -}; +export { createSheetOptions, createSheetTags, createTagifyTraits, maintainFocusInRender, processTagifyInSubmitData }; +export type { SheetOption, SheetOptions, TraitTagifyEntry }; diff --git a/src/module/system/action-macros/types.ts b/src/module/system/action-macros/types.ts index abfca4946bf..823435d5ad2 100644 --- a/src/module/system/action-macros/types.ts +++ b/src/module/system/action-macros/types.ts @@ -100,12 +100,12 @@ interface SkillActionOptions extends ActionDefaultOptions { difficultyClass?: CheckDC; } -export { +export { CheckContextError }; +export type { ActionDefaultOptions, ActionGlyph, CheckContext, CheckContextData, - CheckContextError, CheckContextOptions, CheckResultCallback, SimpleRollActionCheckOptions, diff --git a/src/module/system/alignment.ts b/src/module/system/alignment.ts index 827811fbe0e..3cea6b781fd 100644 --- a/src/module/system/alignment.ts +++ b/src/module/system/alignment.ts @@ -1,17 +1,19 @@ import { Alignment } from "@actor/creature/types.ts"; -export function isEvil(alignment: Alignment): boolean { +function isEvil(alignment: Alignment): boolean { return alignment === "LE" || alignment === "CE" || alignment === "NE"; } -export function isGood(alignment: Alignment): boolean { +function isGood(alignment: Alignment): boolean { return alignment === "LG" || alignment === "CG" || alignment === "NG"; } -export function isLawful(alignment: Alignment): boolean { +function isLawful(alignment: Alignment): boolean { return alignment === "LE" || alignment === "LN" || alignment === "LG"; } -export function isChaotic(alignment: Alignment): boolean { +function isChaotic(alignment: Alignment): boolean { return alignment === "CE" || alignment === "CN" || alignment === "CG"; } + +export { isChaotic, isEvil, isGood, isLawful }; diff --git a/src/module/system/check/check.ts b/src/module/system/check/check.ts index 336eef9b3a3..25ba0ca7bbf 100644 --- a/src/module/system/check/check.ts +++ b/src/module/system/check/check.ts @@ -1,4 +1,4 @@ -import { ActorPF2e, CharacterPF2e } from "@actor"; +import { ActorPF2e } from "@actor"; import { StrikeData, TraitViewData } from "@actor/data/base.ts"; import { CheckModifier } from "@actor/modifiers.ts"; import { RollTarget } from "@actor/types.ts"; @@ -387,7 +387,7 @@ class CheckPF2e { let rerollFlavor = game.i18n.localize(`PF2E.RerollMenu.MessageKeep.${keep}`); if (heroPoint) { // If the reroll costs a hero point, first check if the actor has one to spare and spend it - if (actor instanceof CharacterPF2e) { + if (actor?.isOfType("character")) { const heroPointCount = actor.heroPoints.value; if (heroPointCount) { await actor.update({ @@ -743,4 +743,5 @@ interface CreateTagFlavorParams { extraTags: string[]; } -export { CheckPF2e, CheckRollCallback }; +export { CheckPF2e }; +export type { CheckRollCallback }; diff --git a/src/module/system/check/roll.ts b/src/module/system/check/roll.ts index c3f518e56e0..81d2c172fc3 100644 --- a/src/module/system/check/roll.ts +++ b/src/module/system/check/roll.ts @@ -72,4 +72,4 @@ interface CheckRollDataPF2e extends RollDataPF2e { domains?: string[]; } -export { CheckRoll, CheckRollDataPF2e }; +export { CheckRoll, type CheckRollDataPF2e }; diff --git a/src/module/system/check/types.ts b/src/module/system/check/types.ts index 526281138b2..f8254966dc2 100644 --- a/src/module/system/check/types.ts +++ b/src/module/system/check/types.ts @@ -56,4 +56,4 @@ interface CheckRollContext extends BaseRollContext { dosAdjustments?: DegreeOfSuccessAdjustment[]; } -export { CheckRollContext, CheckType, RollTwiceOption }; +export type { CheckRollContext, CheckType, RollTwiceOption }; diff --git a/src/module/system/damage/damage.ts b/src/module/system/damage/damage.ts index c57577a63c4..ee0287ca2fc 100644 --- a/src/module/system/damage/damage.ts +++ b/src/module/system/damage/damage.ts @@ -1,6 +1,6 @@ -import { ActorPF2e } from "@actor"; +import type { ActorPF2e } from "@actor"; import { StrikeData } from "@actor/data/base.ts"; -import { ItemPF2e } from "@item"; +import type { ItemPF2e } from "@item"; import { createActionRangeLabel } from "@item/ability/helpers.ts"; import { ChatMessagePF2e, DamageRollContextFlag } from "@module/chat-message/index.ts"; import { ZeroToThree } from "@module/data.ts"; diff --git a/src/module/system/damage/formula.ts b/src/module/system/damage/formula.ts index 721f7ba6f35..63fd668dca3 100644 --- a/src/module/system/damage/formula.ts +++ b/src/module/system/damage/formula.ts @@ -1,11 +1,11 @@ -import { DamageDicePF2e } from "@actor/modifiers.ts"; +import type { DamageDicePF2e } from "@actor/modifiers.ts"; import { DEGREE_OF_SUCCESS, DegreeOfSuccessIndex } from "@system/degree-of-success.ts"; import { addSign, groupBy, sortBy, sum } from "@util"; import * as R from "remeda"; import { + CreateDamageFormulaParams, CriticalInclusion, DamageCategoryUnique, - CreateDamageFormulaParams, DamagePartialTerm, DamageType, MaterialDamageEffect, @@ -367,4 +367,5 @@ interface DamagePartial extends DamagePartialTerm { materials?: MaterialDamageEffect[]; } -export { AssembledFormula, combinePartialTerms, createSimpleFormula, createDamageFormula, parseTermsFromSimpleFormula }; +export { combinePartialTerms, createDamageFormula, createSimpleFormula, parseTermsFromSimpleFormula }; +export type { AssembledFormula }; diff --git a/src/module/system/damage/helpers.ts b/src/module/system/damage/helpers.ts index b43c9ed9bcb..24ed6995e53 100644 --- a/src/module/system/damage/helpers.ts +++ b/src/module/system/damage/helpers.ts @@ -1,4 +1,4 @@ -import { DamageDicePF2e } from "@actor/modifiers.ts"; +import type { DamageDicePF2e } from "@actor/modifiers.ts"; import { ErrorPF2e, fontAwesomeIcon, setHasElement } from "@util"; import * as R from "remeda"; import { combinePartialTerms } from "./formula.ts"; diff --git a/src/module/system/damage/iwr.ts b/src/module/system/damage/iwr.ts index 8fbfdc30419..83885ac791c 100644 --- a/src/module/system/damage/iwr.ts +++ b/src/module/system/damage/iwr.ts @@ -1,4 +1,4 @@ -import { ActorPF2e } from "@actor"; +import type { ActorPF2e } from "@actor"; import { NON_DAMAGE_WEAKNESSES, ResistanceData, WeaknessData } from "@actor/data/iwr.ts"; import { DEGREE_OF_SUCCESS } from "@system/degree-of-success.ts"; import * as R from "remeda"; @@ -254,4 +254,5 @@ type IWRApplication = | ResistanceApplication | DamageReductionApplication; -export { IWRApplication, IWRApplicationData, applyIWR }; +export { applyIWR }; +export type { IWRApplication, IWRApplicationData }; diff --git a/src/module/system/damage/roll.ts b/src/module/system/damage/roll.ts index fb85f8de58a..cf4694672c1 100644 --- a/src/module/system/damage/roll.ts +++ b/src/module/system/damage/roll.ts @@ -1,6 +1,6 @@ import { ResistanceType } from "@actor/types.ts"; import { DamageRollFlag } from "@module/chat-message/index.ts"; -import { UserPF2e } from "@module/user/index.ts"; +import type { UserPF2e } from "@module/user/index.ts"; import { DegreeOfSuccessIndex } from "@system/degree-of-success.ts"; import { RollDataPF2e } from "@system/rolls.ts"; import { ErrorPF2e, fontAwesomeIcon, isObject, objectHasKey, tupleHasValue } from "@util"; @@ -603,4 +603,4 @@ interface DamageRollDataPF2e extends RollDataPF2e, AbstractDamageRollData { type DamageInstanceData = AbstractDamageRollData; -export { DamageInstance, DamageRoll, DamageRollDataPF2e }; +export { DamageInstance, DamageRoll, type DamageRollDataPF2e }; diff --git a/src/module/system/damage/terms.ts b/src/module/system/damage/terms.ts index 31aa8f0ea73..d1ff8c8ce08 100644 --- a/src/module/system/damage/terms.ts +++ b/src/module/system/damage/terms.ts @@ -488,4 +488,5 @@ interface InstancePool extends PoolTerm { rolls: DamageInstance[]; } -export { ArithmeticExpression, Grouping, GroupingData, InstancePool, IntermediateDie }; +export { ArithmeticExpression, Grouping, InstancePool, IntermediateDie }; +export type { GroupingData }; diff --git a/src/module/system/damage/types.ts b/src/module/system/damage/types.ts index 9883fae5b48..7839c682eae 100644 --- a/src/module/system/damage/types.ts +++ b/src/module/system/damage/types.ts @@ -112,7 +112,7 @@ type SimpleDamageTemplate = SpellDamageTemplate; type DamageTemplate = WeaponDamageTemplate | SpellDamageTemplate | AfflictionDamageTemplate | SimpleDamageTemplate; -export { +export type { AfflictionDamageTemplate, BaseDamageData, CreateDamageFormulaParams, diff --git a/src/module/system/damage/weapon.ts b/src/module/system/damage/weapon.ts index d4e5179fe12..33e0010efa5 100644 --- a/src/module/system/damage/weapon.ts +++ b/src/module/system/damage/weapon.ts @@ -680,4 +680,4 @@ interface ExcludeDamageParams { options: Set; } -export { ConvertedNPCDamage, WeaponDamagePF2e }; +export { WeaponDamagePF2e, type ConvertedNPCDamage }; diff --git a/src/module/system/degree-of-success.ts b/src/module/system/degree-of-success.ts index ccb1a5577b0..23f6e381b6b 100644 --- a/src/module/system/degree-of-success.ts +++ b/src/module/system/degree-of-success.ts @@ -1,7 +1,7 @@ import { ZeroToThree } from "@module/data.ts"; -import { CheckRoll } from "./check/roll.ts"; -import { PredicatePF2e } from "./predication.ts"; -import { StatisticDifficultyClass } from "./statistic/index.ts"; +import type { CheckRoll } from "./check/roll.ts"; +import type { PredicatePF2e } from "./predication.ts"; +import type { StatisticDifficultyClass } from "./statistic/index.ts"; /** Get the degree of success from a roll and a difficulty class */ class DegreeOfSuccess { @@ -168,14 +168,11 @@ type DegreeOfSuccessIndex = ZeroToThree; const DEGREE_OF_SUCCESS_STRINGS = ["criticalFailure", "failure", "success", "criticalSuccess"] as const; type DegreeOfSuccessString = (typeof DEGREE_OF_SUCCESS_STRINGS)[number]; -export { +export { DEGREE_ADJUSTMENT_AMOUNTS, DEGREE_OF_SUCCESS, DEGREE_OF_SUCCESS_STRINGS, DegreeOfSuccess }; +export type { CheckDC, - DEGREE_ADJUSTMENT_AMOUNTS, - DEGREE_OF_SUCCESS, - DEGREE_OF_SUCCESS_STRINGS, DegreeAdjustmentAmount, DegreeAdjustmentsRecord, - DegreeOfSuccess, DegreeOfSuccessAdjustment, DegreeOfSuccessIndex, DegreeOfSuccessString, diff --git a/src/module/system/predication.ts b/src/module/system/predication.ts index ea48023e510..e5d509232ac 100644 --- a/src/module/system/predication.ts +++ b/src/module/system/predication.ts @@ -235,4 +235,5 @@ type PredicateStatement = Atom | CompoundStatement; type RawPredicate = PredicateStatement[]; -export { PredicatePF2e, PredicateStatement, RawPredicate, StatementValidator }; +export { PredicatePF2e, StatementValidator }; +export type { PredicateStatement, RawPredicate }; diff --git a/src/module/system/rolls.ts b/src/module/system/rolls.ts index 59aee7702f9..bca8d0ab35c 100644 --- a/src/module/system/rolls.ts +++ b/src/module/system/rolls.ts @@ -64,4 +64,4 @@ interface BaseRollContext { skipDialog?: boolean; } -export { AttackRollParams, BaseRollContext, DamageRollParams, RollDataPF2e, RollParameters, RollTwiceOption }; +export type { AttackRollParams, BaseRollContext, DamageRollParams, RollDataPF2e, RollParameters, RollTwiceOption }; diff --git a/src/module/system/settings/homebrew/data.ts b/src/module/system/settings/homebrew/data.ts index 54bfe5319e8..32e2f175b7a 100644 --- a/src/module/system/settings/homebrew/data.ts +++ b/src/module/system/settings/homebrew/data.ts @@ -50,13 +50,12 @@ interface HomebrewElementsSheetData extends MenuTemplateData { customDamageTypes: CustomDamageData[]; } -export { +export { HOMEBREW_TRAIT_KEYS, SECONDARY_TRAIT_RECORDS }; +export type { CustomDamageData, - HOMEBREW_TRAIT_KEYS, HomebrewElementsSheetData, HomebrewKey, HomebrewTag, HomebrewTraitKey, HomebrewTraitSettingsKey, - SECONDARY_TRAIT_RECORDS, }; diff --git a/src/module/system/settings/index.ts b/src/module/system/settings/index.ts index ed39e207c58..a074ac4d852 100644 --- a/src/module/system/settings/index.ts +++ b/src/module/system/settings/index.ts @@ -1,6 +1,6 @@ import { resetActors } from "@actor/helpers.ts"; import { ActorSheetPF2e } from "@actor/sheet/base.ts"; -import { ItemPF2e, ItemSheetPF2e } from "@item"; +import { type ItemPF2e, ItemSheetPF2e } from "@item"; import { StatusEffects } from "@module/canvas/status-effects.ts"; import { MigrationRunner } from "@module/migration/runner/index.ts"; import { isImageOrVideoPath } from "@util"; diff --git a/src/module/system/settings/menu.ts b/src/module/system/settings/menu.ts index 31ed57c284b..d110cc812a7 100644 --- a/src/module/system/settings/menu.ts +++ b/src/module/system/settings/menu.ts @@ -146,11 +146,5 @@ function settingsToSheetData( }, {}); } -export { - MenuTemplateData, - PartialSettingsData, - SettingsMenuOptions, - SettingsMenuPF2e, - SettingsTemplateData, - settingsToSheetData, -}; +export { SettingsMenuPF2e, settingsToSheetData }; +export type { MenuTemplateData, PartialSettingsData, SettingsMenuOptions, SettingsTemplateData }; diff --git a/src/module/system/statistic/armor-class.ts b/src/module/system/statistic/armor-class.ts index a62fa27a62e..b6fbaa43903 100644 --- a/src/module/system/statistic/armor-class.ts +++ b/src/module/system/statistic/armor-class.ts @@ -99,4 +99,4 @@ interface ArmorClassTraceData extends StatisticTraceData { details: string; } -export { ArmorClassTraceData, ArmorStatistic }; +export { ArmorStatistic, type ArmorClassTraceData }; diff --git a/src/module/system/statistic/data.ts b/src/module/system/statistic/data.ts index a854b891149..ca4a6d0ea8b 100644 --- a/src/module/system/statistic/data.ts +++ b/src/module/system/statistic/data.ts @@ -83,7 +83,7 @@ interface StatisticTraceData extends BaseStatisticTraceData { dc: number; } -export { +export type { BaseStatisticData, BaseStatisticTraceData, StatisticChatData, diff --git a/src/module/system/statistic/index.ts b/src/module/system/statistic/index.ts index 2a1b2fb06eb..69cfc3f4ac0 100644 --- a/src/module/system/statistic/index.ts +++ b/src/module/system/statistic/index.ts @@ -713,12 +713,5 @@ interface RollOptionConfig { } export * from "./data.ts"; -export { - BaseStatistic, - CheckDCReference, - RollOptionConfig, - Statistic, - StatisticCheck, - StatisticDifficultyClass, - StatisticRollParameters, -}; +export { BaseStatistic, Statistic, StatisticCheck, StatisticDifficultyClass }; +export type { CheckDCReference, RollOptionConfig, StatisticRollParameters }; diff --git a/src/module/system/tag-selector/base.ts b/src/module/system/tag-selector/base.ts index d7db49ceb85..ab03339e109 100644 --- a/src/module/system/tag-selector/base.ts +++ b/src/module/system/tag-selector/base.ts @@ -93,4 +93,5 @@ interface TagSelectorData extends Docume documentType: string; } -export { BaseTagSelector, TagSelectorData, TagSelectorOptions }; +export { BaseTagSelector }; +export type { TagSelectorData, TagSelectorOptions }; diff --git a/src/module/system/tag-selector/basic.ts b/src/module/system/tag-selector/basic.ts index b571869597e..f51b0f0bd43 100644 --- a/src/module/system/tag-selector/basic.ts +++ b/src/module/system/tag-selector/basic.ts @@ -1,6 +1,6 @@ -import { ActorPF2e } from "@actor"; +import type { ActorPF2e } from "@actor"; import { ActorSourcePF2e } from "@actor/data/index.ts"; -import { ItemPF2e } from "@item"; +import type { ItemPF2e } from "@item"; import { ItemSourcePF2e } from "@item/data/index.ts"; import { ValuesList } from "@module/data.ts"; import { htmlQuery, htmlQueryAll } from "@util"; diff --git a/src/module/system/tag-selector/index.ts b/src/module/system/tag-selector/index.ts index ecac5551a30..c6bda968a67 100644 --- a/src/module/system/tag-selector/index.ts +++ b/src/module/system/tag-selector/index.ts @@ -1,8 +1,3 @@ -export { type BasicConstructorOptions, TagSelectorBasic } from "./basic.ts"; -export { SenseSelector } from "./senses.ts"; -export { SpeedSelector } from "./speeds.ts"; -export type { TagSelectorOptions } from "./base.ts"; - const TAG_SELECTOR_TYPES = ["basic", "senses", "speed-types"] as const; type TagSelectorType = (typeof TAG_SELECTOR_TYPES)[number]; @@ -80,4 +75,9 @@ const SELECTABLE_TAG_FIELDS = [ type SelectableTagField = (typeof SELECTABLE_TAG_FIELDS)[number]; -export { SELECTABLE_TAG_FIELDS, SelectableTagField, TAG_SELECTOR_TYPES, TagSelectorType }; +export type { TagSelectorOptions } from "./base.ts"; +export { TagSelectorBasic, type BasicConstructorOptions } from "./basic.ts"; +export { SenseSelector } from "./senses.ts"; +export { SpeedSelector } from "./speeds.ts"; +export { SELECTABLE_TAG_FIELDS, TAG_SELECTOR_TYPES }; +export type { SelectableTagField, TagSelectorType }; diff --git a/src/module/system/tag-selector/senses.ts b/src/module/system/tag-selector/senses.ts index c64495f6fa8..8a4abb8d5bb 100644 --- a/src/module/system/tag-selector/senses.ts +++ b/src/module/system/tag-selector/senses.ts @@ -1,10 +1,10 @@ -import { ActorPF2e } from "@actor"; +import type { ActorPF2e } from "@actor"; import { SENSES_WITH_MANDATORY_ACUITIES } from "@actor/creature/values.ts"; import { ErrorPF2e, htmlClosest, htmlQuery, htmlQueryAll, objectHasKey } from "@util"; import { BaseTagSelector, TagSelectorData, TagSelectorOptions } from "./base.ts"; import { SelectableTagField } from "./index.ts"; -export class SenseSelector extends BaseTagSelector { +class SenseSelector extends BaseTagSelector { protected objectProperty = "system.traits.senses"; static override get defaultOptions(): TagSelectorOptions { @@ -119,3 +119,5 @@ interface SenseChoiceData { } type SenseFormData = Record; + +export { SenseSelector }; diff --git a/src/module/system/tag-selector/speeds.ts b/src/module/system/tag-selector/speeds.ts index b247e9d8e32..f0f5b782845 100644 --- a/src/module/system/tag-selector/speeds.ts +++ b/src/module/system/tag-selector/speeds.ts @@ -1,9 +1,9 @@ -import { ActorPF2e } from "@actor"; +import type { ActorPF2e } from "@actor"; import { ErrorPF2e, htmlQueryAll } from "@util"; import { BaseTagSelector, TagSelectorData } from "./base.ts"; import { SelectableTagField, TagSelectorOptions } from "./index.ts"; -export class SpeedSelector extends BaseTagSelector { +class SpeedSelector extends BaseTagSelector { protected objectProperty = "system.attributes.speed.otherSpeeds"; static override get defaultOptions(): TagSelectorOptions { @@ -84,3 +84,5 @@ interface ChoiceData { label: string; value: number | string; } + +export { SpeedSelector }; diff --git a/src/module/system/text-editor.ts b/src/module/system/text-editor.ts index a88d40396e3..01c8aaf4bda 100644 --- a/src/module/system/text-editor.ts +++ b/src/module/system/text-editor.ts @@ -831,4 +831,4 @@ interface CheckLinkParams { roller?: string; } -export { EnrichmentOptionsPF2e, TextEditorPF2e }; +export { TextEditorPF2e, type EnrichmentOptionsPF2e }; diff --git a/src/module/user/data.ts b/src/module/user/data.ts index bc98a97fd9c..cc70df79a90 100644 --- a/src/module/user/data.ts +++ b/src/module/user/data.ts @@ -10,4 +10,4 @@ type UserFlagsPF2e = DocumentFlags & { }; }; -export { UserFlagsPF2e, UserSourcePF2e }; +export type { UserFlagsPF2e, UserSourcePF2e }; diff --git a/src/module/user/document.ts b/src/module/user/document.ts index e035c446d43..10553282be2 100644 --- a/src/module/user/document.ts +++ b/src/module/user/document.ts @@ -1,6 +1,6 @@ -import { ActorPF2e } from "@actor/base.ts"; -import { TokenPF2e } from "@module/canvas/index.ts"; -import { ScenePF2e, TokenDocumentPF2e } from "@scene/index.ts"; +import type { ActorPF2e } from "@actor/base.ts"; +import type { TokenPF2e } from "@module/canvas/index.ts"; +import type { ScenePF2e, TokenDocumentPF2e } from "@scene/index.ts"; import { UserFlagsPF2e, UserSourcePF2e } from "./data.ts"; class UserPF2e extends User> { @@ -70,4 +70,4 @@ interface UserSettingsPF2e { searchPackContents: boolean; } -export { UserPF2e, UserSettingsPF2e }; +export { UserPF2e, type UserSettingsPF2e }; diff --git a/src/module/user/sheet.ts b/src/module/user/sheet.ts index 6dfd66bab93..fd6ea96a3b1 100644 --- a/src/module/user/sheet.ts +++ b/src/module/user/sheet.ts @@ -1,4 +1,4 @@ -import { UserPF2e } from "./document.ts"; +import type { UserPF2e } from "./document.ts"; /** Player-specific settings, stored as flags on each User */ export class UserConfigPF2e extends UserConfig { diff --git a/src/scripts/config/damage.ts b/src/scripts/config/damage.ts index caa1aa47ea9..ab95ea38534 100644 --- a/src/scripts/config/damage.ts +++ b/src/scripts/config/damage.ts @@ -1,6 +1,6 @@ import { DamageCategoryUnique, DamageType } from "@system/damage/types.ts"; import { DAMAGE_TYPES } from "@system/damage/values.ts"; -import { pick } from "@util"; +import * as R from "remeda"; import { alignmentTraits, energyDamageTypes, preciousMaterials } from "./traits.ts"; const damageCategoriesUnique: Record = { @@ -9,7 +9,7 @@ const damageCategoriesUnique: Record = { splash: "PF2E.TraitSplash", }; -const materialDamageEffects = pick(preciousMaterials, [ +const materialDamageEffects = R.pick(preciousMaterials, [ "abysium", "adamantine", "cold-iron", diff --git a/src/scripts/config/traits.ts b/src/scripts/config/traits.ts index f453e6e0b69..89f93048f62 100644 --- a/src/scripts/config/traits.ts +++ b/src/scripts/config/traits.ts @@ -1384,7 +1384,7 @@ const kingmakerTraits = { }; export { - ElementTrait, + type ElementTrait, actionTraits, alignmentTraits, ancestryItemTraits, diff --git a/src/scripts/dice.ts b/src/scripts/dice.ts index 2f3649258cb..a3bf16bf04f 100644 --- a/src/scripts/dice.ts +++ b/src/scripts/dice.ts @@ -1,5 +1,5 @@ -import { ActorPF2e } from "@actor"; -import { ItemPF2e } from "@item"; +import type { ActorPF2e } from "@actor"; +import type { ItemPF2e } from "@item"; import { createSimpleFormula, parseTermsFromSimpleFormula } from "@system/damage/formula.ts"; import { ErrorPF2e } from "@util"; diff --git a/src/scripts/macros/earn-income/calculate.ts b/src/scripts/macros/earn-income/calculate.ts index c5d6b4318af..70585b3de4e 100644 --- a/src/scripts/macros/earn-income/calculate.ts +++ b/src/scripts/macros/earn-income/calculate.ts @@ -2,7 +2,7 @@ import { Coins } from "@item/physical/data.ts"; import { CoinsPF2e } from "@item/physical/helpers.ts"; import { OneToFour } from "@module/data.ts"; import { calculateDC } from "@module/dc.ts"; -import { DegreeOfSuccessIndex, DegreeOfSuccess, RollBrief } from "@system/degree-of-success.ts"; +import { DegreeOfSuccess, DegreeOfSuccessIndex, RollBrief } from "@system/degree-of-success.ts"; /** * Implementation of Earn Income rules on https://2e.aonprd.com/Skills.aspx?ID=2&General=true @@ -149,4 +149,5 @@ interface EarnIncomeResult { roll: number; } -export { EarnIncomeOptions, EarnIncomeResult, PerDayEarnIncomeResult, calculateDC, earnIncome, getIncomeForLevel }; +export { calculateDC, earnIncome, getIncomeForLevel }; +export type { EarnIncomeOptions, EarnIncomeResult, PerDayEarnIncomeResult }; diff --git a/src/scripts/macros/earn-income/helpers.ts b/src/scripts/macros/earn-income/helpers.ts index 1a69d33352a..9bcc8994f6f 100644 --- a/src/scripts/macros/earn-income/helpers.ts +++ b/src/scripts/macros/earn-income/helpers.ts @@ -1,10 +1,10 @@ -import { CharacterPF2e } from "@actor"; +import type { CharacterPF2e } from "@actor"; import { CoinsPF2e } from "@item/physical/helpers.ts"; import { ChatMessagePF2e } from "@module/chat-message/index.ts"; import { OneToFour } from "@module/data.ts"; import { calculateDC } from "@module/dc.ts"; import { DegreeOfSuccessIndex, DEGREE_OF_SUCCESS_STRINGS, RollBrief } from "@system/degree-of-success.ts"; -import { Statistic } from "@system/statistic/index.ts"; +import type { Statistic } from "@system/statistic/index.ts"; import { earnIncome, EarnIncomeResult } from "./calculate.ts"; function escapeHtml(text: string): string { diff --git a/src/scripts/macros/xp/index.ts b/src/scripts/macros/xp/index.ts index dff3f90a012..09bc0ca68d7 100644 --- a/src/scripts/macros/xp/index.ts +++ b/src/scripts/macros/xp/index.ts @@ -153,4 +153,4 @@ function calculateXP( } export { xpFromEncounter } from "./dialog.ts"; -export { XPCalculation, calculateXP }; +export { type XPCalculation, calculateXP }; diff --git a/src/scripts/socket.ts b/src/scripts/socket.ts index b90328bd172..9e09697cb9d 100644 --- a/src/scripts/socket.ts +++ b/src/scripts/socket.ts @@ -67,4 +67,4 @@ interface ShowSheetMessage { type SocketMessage = TransferCallbackMessage | RefreshControlsMessage | ShowSheetMessage | { request?: never }; type PF2eSocketEventParams = [message: SocketMessage, userId: string]; -export { activateSocketListener, SocketMessage }; +export { activateSocketListener, type SocketMessage }; diff --git a/src/scripts/ui/user-visibility.ts b/src/scripts/ui/user-visibility.ts index f24b2662eff..69a464206c6 100644 --- a/src/scripts/ui/user-visibility.ts +++ b/src/scripts/ui/user-visibility.ts @@ -101,4 +101,4 @@ interface ProcessOptions { message?: ChatMessagePF2e; } -export { USER_VISIBILITIES, UserVisibility, UserVisibilityPF2e }; +export { USER_VISIBILITIES, type UserVisibility, UserVisibilityPF2e }; diff --git a/src/util/misc.ts b/src/util/misc.ts index b00783a0375..c2c7708a071 100644 --- a/src/util/misc.ts +++ b/src/util/misc.ts @@ -445,8 +445,8 @@ function isImageOrVideoPath(path: unknown): path is ImageFilePath | VideoFilePat export { ErrorPF2e, - Fraction, - SlugCamel, + type Fraction, + type SlugCamel, addSign, applyNTimes, configFromLocalization, diff --git a/src/util/token-actor-utils.ts b/src/util/token-actor-utils.ts index 958aa49d5ad..1129d3f11ef 100644 --- a/src/util/token-actor-utils.ts +++ b/src/util/token-actor-utils.ts @@ -1,4 +1,4 @@ -import { ActorPF2e } from "@actor"; +import type { ActorPF2e } from "@actor"; import { ActorType } from "@actor/data/index.ts"; /** diff --git a/tsconfig.json b/tsconfig.json index 51c0d8a6081..14b1693b9f7 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -20,6 +20,7 @@ "forceConsistentCasingInFileNames": true, "esModuleInterop": true, "sourceMap": true, + "isolatedModules": true, "baseUrl": ".", "rootDir": ".", "outDir": "dist",