refactor: prefer type imports and sort imports
This commit is contained in:
parent
8d2cff77d7
commit
9cffa4df04
49 changed files with 124 additions and 105 deletions
|
@ -5,9 +5,10 @@
|
|||
//
|
||||
// SPDX-License-Identifier: MIT
|
||||
|
||||
import { ModifiableDataBaseTotal, ResourceDataBaseTotalMax } from "../common/common-data";
|
||||
import { DS4 } from "../config";
|
||||
|
||||
import type { ModifiableDataBaseTotal, ResourceDataBaseTotalMax } from "../common/common-data";
|
||||
|
||||
export interface DS4ActorDataPropertiesDataBase {
|
||||
attributes: DS4ActorDataPropertiesDataAttributes;
|
||||
traits: DS4ActorDataPropertiesDataTraits;
|
||||
|
|
|
@ -2,8 +2,8 @@
|
|||
//
|
||||
// SPDX-License-Identifier: MIT
|
||||
|
||||
import { DS4CharacterDataProperties } from "./character/character-data-properties";
|
||||
import { DS4CreatureDataProperties } from "./creature/creature-data-properties";
|
||||
import type { DS4CharacterDataProperties } from "./character/character-data-properties";
|
||||
import type { DS4CreatureDataProperties } from "./creature/creature-data-properties";
|
||||
|
||||
declare global {
|
||||
interface DataConfig {
|
||||
|
|
|
@ -5,9 +5,10 @@
|
|||
//
|
||||
// SPDX-License-Identifier: MIT
|
||||
|
||||
import { ModifiableData, ModifiableDataBase, ResourceData } from "../common/common-data";
|
||||
import { DS4 } from "../config";
|
||||
|
||||
import type { ModifiableData, ModifiableDataBase, ResourceData } from "../common/common-data";
|
||||
|
||||
export interface DS4ActorDataSourceDataBase {
|
||||
attributes: DS4ActorDataSourceDataAttributes;
|
||||
traits: DS4ActorDataSourceDataTraits;
|
||||
|
|
|
@ -2,8 +2,8 @@
|
|||
//
|
||||
// SPDX-License-Identifier: MIT
|
||||
|
||||
import { DS4CharacterDataSource } from "./character/character-data-source";
|
||||
import { DS4CreatureDataSource } from "./creature/creature-data-source";
|
||||
import type { DS4CharacterDataSource } from "./character/character-data-source";
|
||||
import type { DS4CreatureDataSource } from "./creature/creature-data-source";
|
||||
|
||||
declare global {
|
||||
interface SourceConfig {
|
||||
|
|
|
@ -6,15 +6,17 @@
|
|||
// SPDX-License-Identifier: MIT
|
||||
|
||||
import { DS4ActiveEffect } from "../active-effect";
|
||||
import { ModifiableDataBaseTotal } from "../common/common-data";
|
||||
import { DS4 } from "../config";
|
||||
import { getCanvas, getGame } from "../helpers";
|
||||
import { DS4Settings, getDS4Settings } from "../settings";
|
||||
import { getDS4Settings } from "../settings";
|
||||
import notifications from "../ui/notifications";
|
||||
import { enforce } from "../utils";
|
||||
import { isCheck } from "./actor-data-properties-base";
|
||||
|
||||
import type { ModifiableDataBaseTotal } from "../common/common-data";
|
||||
import type { DS4Settings } from "../settings";
|
||||
import type { DS4Item } from "../item/item";
|
||||
|
||||
/**
|
||||
* The base sheet class for all {@link DS4Actor}s.
|
||||
*/
|
||||
|
|
|
@ -3,17 +3,18 @@
|
|||
//
|
||||
// SPDX-License-Identifier: MIT
|
||||
|
||||
import { ModifiableDataBaseTotal } from "../common/common-data";
|
||||
import { DS4 } from "../config";
|
||||
import { getGame } from "../helpers";
|
||||
import { DS4ArmorDataProperties } from "../item/armor/armor-data-properties";
|
||||
import { DS4Item } from "../item/item";
|
||||
import { ItemType } from "../item/item-data-source";
|
||||
import { DS4ShieldDataProperties } from "../item/shield/shield-data-properties";
|
||||
import { createCheckRoll } from "../rolls/check-factory";
|
||||
import { Check } from "./actor-data-properties-base";
|
||||
import { isAttribute, isTrait } from "./actor-data-source-base";
|
||||
|
||||
import type { ModifiableDataBaseTotal } from "../common/common-data";
|
||||
import type { DS4ArmorDataProperties } from "../item/armor/armor-data-properties";
|
||||
import type { DS4Item } from "../item/item";
|
||||
import type { ItemType } from "../item/item-data-source";
|
||||
import type { DS4ShieldDataProperties } from "../item/shield/shield-data-properties";
|
||||
import type { Check } from "./actor-data-properties-base";
|
||||
|
||||
declare global {
|
||||
interface DocumentClassConfig {
|
||||
Actor: typeof DS4Actor;
|
||||
|
|
|
@ -2,8 +2,8 @@
|
|||
//
|
||||
// SPDX-License-Identifier: MIT
|
||||
|
||||
import { DS4ActorDataPropertiesDataBase } from "../actor-data-properties-base";
|
||||
import {
|
||||
import type { DS4ActorDataPropertiesDataBase } from "../actor-data-properties-base";
|
||||
import type {
|
||||
DS4CharacterDataSourceDataBaseInfo,
|
||||
DS4CharacterDataSourceDataCurrency,
|
||||
DS4CharacterDataSourceDataProfile,
|
||||
|
|
|
@ -2,8 +2,8 @@
|
|||
//
|
||||
// SPDX-License-Identifier: MIT
|
||||
|
||||
import { UsableResource } from "../../common/common-data";
|
||||
import { DS4ActorDataSourceDataBase } from "../actor-data-source-base";
|
||||
import type { UsableResource } from "../../common/common-data";
|
||||
import type { DS4ActorDataSourceDataBase } from "../actor-data-source-base";
|
||||
|
||||
export interface DS4CharacterDataSource {
|
||||
type: "character";
|
||||
|
|
|
@ -2,9 +2,10 @@
|
|||
//
|
||||
// SPDX-License-Identifier: MIT
|
||||
|
||||
import { ItemType } from "../../item/item-data-source";
|
||||
import { DS4Actor } from "../actor";
|
||||
|
||||
import type { ItemType } from "../../item/item-data-source";
|
||||
|
||||
export class DS4Character extends DS4Actor {
|
||||
/** @override */
|
||||
prepareFinalDerivedData(): void {
|
||||
|
|
|
@ -2,8 +2,8 @@
|
|||
//
|
||||
// SPDX-License-Identifier: MIT
|
||||
|
||||
import { DS4ActorDataPropertiesDataBase } from "../actor-data-properties-base";
|
||||
import { DS4CreatureDataSourceDataBaseInfo } from "./creature-data-source";
|
||||
import type { DS4ActorDataPropertiesDataBase } from "../actor-data-properties-base";
|
||||
import type { DS4CreatureDataSourceDataBaseInfo } from "./creature-data-source";
|
||||
|
||||
export interface DS4CreatureDataProperties {
|
||||
type: "creature";
|
||||
|
|
|
@ -2,8 +2,8 @@
|
|||
//
|
||||
// SPDX-License-Identifier: MIT
|
||||
|
||||
import { DS4 } from "../../config";
|
||||
import { DS4ActorDataSourceDataBase } from "../actor-data-source-base";
|
||||
import type { DS4 } from "../../config";
|
||||
import type { DS4ActorDataSourceDataBase } from "../actor-data-source-base";
|
||||
|
||||
export interface DS4CreatureDataSource {
|
||||
type: "creature";
|
||||
|
|
|
@ -2,9 +2,10 @@
|
|||
//
|
||||
// SPDX-License-Identifier: MIT
|
||||
|
||||
import { ItemType } from "../../item/item-data-source";
|
||||
import { DS4Actor } from "../actor";
|
||||
|
||||
import type { ItemType } from "../../item/item-data-source";
|
||||
|
||||
export class DS4Creature extends DS4Actor {
|
||||
/** @override */
|
||||
get ownableItemTypes(): Array<ItemType> {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue