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

+2 -1
View File
@@ -182,5 +182,6 @@
],
"deno.enable": false,
"deno.unstable": false,
"cSpell.enableFiletypes": ["glsl"]
"cSpell.enableFiletypes": ["glsl"],
"typescript.tsdk": "node_modules\\typescript\\lib"
}
+1 -1
View File
@@ -107,7 +107,7 @@
"lz4": "^0.6.5",
"prettier": "^3.0.3",
"prisma": "^5.4.1",
"typescript": "^5.2.2"
"typescript": "^5.4.5"
},
"packageManager": "[email protected]"
}
@@ -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;
}
+4 -4
View File
@@ -5801,10 +5801,10 @@ type-is@~1.6.18:
media-typer "0.3.0"
mime-types "~2.1.24"
typescript@^5.2.2:
version "5.3.3"
resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.3.3.tgz#b3ce6ba258e72e6305ba66f5c9b452aaee3ffe37"
integrity sha512-pXWcraxM0uxAS+tN0AG/BF2TyqmHO014Z070UsJ+pFvYuRSq8KH8DmWpnbXe0pEPDHXZV3FcAbJkijJ5oNEnWw==
typescript@^5.4.5:
version "5.4.5"
resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.4.5.tgz#42ccef2c571fdbd0f6718b1d1f5e6e5ef006f611"
integrity sha512-vcI4UpRgg81oIRUFwR0WSIHKt11nJ7SAVlYNIu+QpqeyXP+gpQJy/Z4+F0aGxSE4MqwjyXvW/TzgkLAx2AGHwQ==
ua-parser-js@^1.0.33:
version "1.0.37"