Skip to content

Commit

Permalink
better imports
Browse files Browse the repository at this point in the history
  • Loading branch information
alxjrvs committed Dec 4, 2024
1 parent f5216d0 commit 0d23646
Show file tree
Hide file tree
Showing 8 changed files with 11 additions and 14 deletions.
2 changes: 1 addition & 1 deletion src/faces/types.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { RollConfig } from '~src/types'
import { NotationValidationResult } from '~notation'
import { RollArgument } from '~src/tower/types'
import { RollArgument } from '~tower'
import { CustomFacesD } from './customFacesD'

export interface CustomFacesRollConfig extends Omit<RollConfig, 'modifiers'> {
Expand Down
4 changes: 2 additions & 2 deletions src/faces/utils/argumentToCustomFacesRollConfig.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { RollArgument } from '~src/tower/types'
import { argumentToRollConfig } from '~src/tower/utils/argumentToRollConfig'
import { RollArgument } from '~tower'
import { CustomFacesD } from '../customFacesD'
import {
isCustomFacesDiceNotation,
Expand All @@ -8,6 +7,7 @@ import {
import { CustomFacesRollArgument, CustomFacesRollConfig } from '../types'
import { customFacesNotationToCustomFacesRollConfig } from './customFacesNotationToCustomFacesRollConfig'
import { facesFromSides } from './facesFromSides'
import { argumentToRollConfig } from '~src/utils/argumentToRollConfig'

function baseArgumentToCustomFacesRollConfig(
arg: RollArgument
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { isDiceNotation } from '~notation'
import { DiceNotation } from '~src/types'
import { argumentToRollConfig } from '~src/tower/utils/argumentToRollConfig'
import { customCoreNotationPattern } from '../patterns'
import { CustomFacesDiceNotation, CustomFacesRollConfig } from '../types'
import { facesFromSides } from './facesFromSides'
import { argumentToRollConfig } from '~src/utils/argumentToRollConfig'

export function customFacesNotationToCustomFacesRollConfig(
notationString: CustomFacesDiceNotation | DiceNotation
Expand Down
7 changes: 2 additions & 5 deletions src/tower/__tests__/utils/applyModifiers.test.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@
import { describe, expect, spyOn, test } from 'bun:test'
import { Modifiers } from '~src/types'
import { D } from '~dice'
import { RollParameters } from '~src/tower/types'
import {
applyModifiers,
InvalidUniqueError
} from '~src/tower/utils/applyModifiers'
import { RollParameters } from '~tower'
import { applyModifiers, InvalidUniqueError } from '../../utils/applyModifiers'

const mockDie = new D(6)

Expand Down
2 changes: 1 addition & 1 deletion src/tower/__tests__/utils/argumentToRollParameters.test.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { describe, expect, test } from 'bun:test'
import { D } from '~dice'
import { DiceNotation } from '~src/types'
import { argumentToRollParameters } from '~src/tower/utils/argumentToRollParameters'
import { argumentToRollParameters } from '../../utils/argumentToRollParameters'

describe('argumentToRollParameters', () => {
describe('given a number', () => {
Expand Down
2 changes: 1 addition & 1 deletion src/tower/utils/applyModifiers/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { RollParameters } from '~src/tower/types'
import { RollParameters } from '~tower'
import { RollBonuses } from './types'
import {
applyReroll,
Expand Down
2 changes: 1 addition & 1 deletion src/tower/utils/argumentToRollParameters.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { D } from '~dice'
import { isD } from '../guards'
import { RollArgument, RollParameters } from '../types'
import { argumentToRollConfig } from './argumentToRollConfig'
import { argumentToRollConfig } from '../../utils/argumentToRollConfig'
import { configToDescription } from '~src/utils/configToDescription'
import { configToNotation } from '~src/utils/configToNotation'

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { RollConfig } from '~src/types'
import { isRollConfigArgument, isD } from '../guards'
import { RollArgument } from '../types'
import { isRollConfigArgument, isD } from '../tower/guards'
import { RollArgument } from '../tower/types'
import { isDiceNotation } from '~notation'
import { notationToRollConfig } from '~src/utils/notationToRollConfig'

Expand Down

0 comments on commit 0d23646

Please sign in to comment.