Fix TypeScript building issues
Includes definitions fix for instance properties.
This commit is contained in:
parent
fe64fba6d0
commit
b4408cc27b
|
@ -13,7 +13,7 @@ import Character from '../models/Character';
|
|||
@Component
|
||||
export default class CharacterDisplay extends Vue {
|
||||
@Prop() character!: Character;
|
||||
healthText: string;
|
||||
healthText = '';
|
||||
|
||||
created() {
|
||||
this.healthText = `Health: ${this.character.currentHealth} of ${this.character.baseStats.health}`;
|
||||
|
|
|
@ -99,7 +99,7 @@
|
|||
|
||||
<script lang="ts">
|
||||
import { Component, Prop, Vue } from 'vue-property-decorator';
|
||||
import PartyDisplay from './PartyDisplay';
|
||||
import PartyDisplay from './PartyDisplay.vue';
|
||||
import { DiceRoll, DiceRoller } from 'rpg-dice-roller';
|
||||
import World from '../models/World';
|
||||
import Character from '../models/Character';
|
||||
|
@ -297,9 +297,9 @@ export default class HelloWorld extends Vue {
|
|||
currentHealth: 10
|
||||
};
|
||||
|
||||
let roll: DiceRoll | DiceRoll[];
|
||||
let damageRoll: DiceRoll | DiceRoll[];
|
||||
let dodgeRoll: DiceRoll | DiceRoll[];
|
||||
let roll: DiceRoll;
|
||||
let damageRoll: DiceRoll;
|
||||
let dodgeRoll: DiceRoll;
|
||||
let currentCharacter = 0;
|
||||
let nextCharacter = 1;
|
||||
let damageTotal = 0;
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
|
||||
<script lang="ts">
|
||||
import { Component, Prop, Vue } from 'vue-property-decorator';
|
||||
import CharacterDisplay from './CharacterDisplay';
|
||||
import CharacterDisplay from './CharacterDisplay.vue';
|
||||
import Party from '../models/Party';
|
||||
import { partyStateToText } from '../utilities/Enums'
|
||||
@Component({
|
||||
|
@ -32,7 +32,7 @@ import { partyStateToText } from '../utilities/Enums'
|
|||
|
||||
export default class PartyDisplay extends Vue {
|
||||
@Prop() private party!: Party;
|
||||
partyHeading: string;
|
||||
partyHeading ='';
|
||||
stateText = '';
|
||||
|
||||
created() {
|
||||
|
|
9
src/testWorld.d.ts
vendored
Normal file
9
src/testWorld.d.ts
vendored
Normal file
|
@ -0,0 +1,9 @@
|
|||
import Vue from 'vue';
|
||||
import World from './models/World';
|
||||
|
||||
declare module 'vue/types/vue' {
|
||||
interface Vue {
|
||||
$world: World;
|
||||
$testWorld: World;
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user