fix: typing parity

This commit is contained in:
TrèsAbhi committed 2024-05-27 21:08:05 -05:00
1 parent 96ce3c7d41
commit 615d7f06aa
6 files changed
+16 -13

No files matched your search

@@ -163,7 +163,9 @@ export function ShotDisplay() {
(shot.out.layers.at(-1) as ShotLayerNonExternal).point,
)
: LENGTH_INFINITY;
const inLast = shot.in.layers.findLast((layer) => layer.type !== null)!;
const inLast = shot.in.layers.findLast(
(layer) => layer.type !== null,
) as ShotLayerNonExternal;
const outTitleColor = shot.out
? shotStatusColors[shot.out.status]
: undefined;
+3 -3
View File
@@ -1,5 +1,5 @@
import { ShellDefinition } from '../blitzkit/tankDefinitions';
import { ShellDefinition, ShellType } from '../blitzkit/tankDefinitions';
export function canSplash(type: ShellDefinition['type']): type is 'he' {
return type === 'he';
export function canSplash(type: ShellDefinition['type']): type is ShellType.HE {
return type === ShellType.HE;
}
+3 -3
View File
@@ -1,7 +1,7 @@
import { ShellDefinition } from '../blitzkit/tankDefinitions';
import { ShellDefinition, ShellType } from '../blitzkit/tankDefinitions';
export function isExplosive(
type: ShellDefinition['type'],
): type is 'he' | 'hc' {
return type === 'he' || type === 'hc';
): type is ShellType.HEAT | ShellType.HE {
return type === ShellType.HEAT || type === ShellType.HE;
}