Skip to content

Commit f324dc4

Browse files
committed
fix tsc & use prepare for now
1 parent b9a2813 commit f324dc4

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"scripts": {
88
"start": "tsc && node dist/app.js",
99
"build": "tsc && node scripts/genTypes.mjs",
10-
"prepublishOnly": "pnpm build",
10+
"prepare": "pnpm build",
1111
"lint": "eslint src/**",
1212
"fix": "eslint src/** --fix",
1313
"mocha_test": "mocha --reporter spec --timeout 3000 --exit",

src/lib/modules/effects.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ export const entity = function (entity: Entity, serv: Server) {
4646
} else return false
4747
}
4848

49-
entity.removeEffect = (effectId, opt) => {
49+
entity.removeEffect = (effectId, opt?) => {
5050
clearTimeout(entity.effects[effectId].timeout)
5151
entity.effects[effectId] = null
5252
entity.sendRemoveEffect(effectId, opt)
@@ -89,7 +89,7 @@ export const server = function (serv: Server, options: Options) {
8989
})
9090
})
9191
}
92-
const chatSelect = (targets.length === 1 ? (targets[0].type === 'player' ? targets[0].username : 'entity') : 'entities')
92+
const chatSelect = (targets.length === 1 ? (targets[0].type === 'player' ? (targets[0] as Player).username : 'entity') : 'entities')
9393
if (params[2] === 'clear') {
9494
if (ctx.player) ctx.player.chat('Remove all effects from ' + chatSelect + '.')
9595
else serv.info('Remove all effects from ' + chatSelect + '.')
@@ -111,6 +111,6 @@ declare global {
111111
"sendEffect": (effectId: any, { amplifier, duration, particles, whitelist, blacklist }?: { amplifier?: number | undefined; duration?: number | undefined; particles?: boolean | undefined; whitelist?: any; blacklist?: any[] | undefined }) => void
112112
"sendRemoveEffect": (effectId: any, { whitelist, blacklist }?: { whitelist?: any; blacklist?: any[] | undefined }) => void
113113
"addEffect": (effectId: any, opt?: {}) => boolean
114-
"removeEffect": (effectId: any, opt: any) => void
114+
removeEffect: (effectId: any, opt?: any) => void
115115
}
116116
}

0 commit comments

Comments
 (0)