Stopped typescript shouting about things you can't fix in js

This commit is contained in:
Thaum Rystra
2024-03-26 10:20:48 +02:00
parent 352e89ee9a
commit 3a6639fbc3
5 changed files with 1 additions and 25 deletions

View File

@@ -57,7 +57,6 @@ export default {
data() { return {
tabName: 'actions',
}},
// @ts-ignore Meteor isn't defined on vue
meteor: {
actions() {
const folderIds = CreatureProperties.find({

View File

@@ -272,7 +272,6 @@ export default {
return this.hiddenSlots.length + this.hiddenPointBuys.length;
},
},
// @ts-ignore Meteor isn't defined on vue
meteor: {
creature(){
return Creatures.findOne(this.creatureId);

View File

@@ -36,7 +36,6 @@
import CreatureProperties from '/imports/api/creature/creatureProperties/CreatureProperties';
import SlotCard from '/imports/client/ui/creature/slots/SlotCard.vue';
import PointBuyCard from '/imports/client/ui/properties/components/pointBuy/PointBuyCard.vue';
import ColumnLayout from '/imports/client/ui/components/ColumnLayout.vue';
import updateCreatureProperty from '/imports/api/creature/creatureProperties/methods/updateCreatureProperty';
import { snackbar } from '/imports/client/ui/components/snackbars/SnackbarQueue';
@@ -44,7 +43,6 @@ export default {
components: {
SlotCard,
PointBuyCard,
ColumnLayout,
},
inject: {
context: { default: {} }

View File

@@ -1,21 +0,0 @@
import { create, all } from 'mathjs';
const math = create(all);
math.import({
'if': function(pred, a, b) {
return pred ? a : b;
},
'roll': function(number, diceSize){
let randomSrc = DDP.randomStream('diceRoller');
if (number > 100) throw 'Can only roll 100 dice at a time';
let rollTotal = 0;
let i, roll;
for (i = 0; i < number; i++){
roll = ~~(randomSrc.fraction() * diceSize) + 1
rollTotal += roll;
}
return rollTotal;
}
});
export default math;

View File

@@ -12,6 +12,7 @@
"preserveSymlinks": true,
"allowJs": true,
"checkJs": true,
"noImplicitAny": false,
"outDir": "build",
"paths": {
"/*": [