Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Debug Type Check #1046

Merged
merged 3 commits into from
Jan 8, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions project/Server.code-workspace
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,10 @@
{
"name": "Debug",
"type": "node",
"program": "${workspaceFolder}/src/entry/run.ts",
"runtimeVersion": "22.12.0",
"runtimeExecutable": "tsx",
"runtimeExecutable": "npm",
"request": "launch",
"runtimeArgs": ["watch", "--clear-screen=false"],
"runtimeArgs": ["run", "run:debug"],
"console": "integratedTerminal",
"internalConsoleOptions": "neverOpen",
"skipFiles": ["<node_internals>/**", "${workspaceFolder}/node_modules/**"]
Expand Down
4 changes: 2 additions & 2 deletions project/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
"check:circular": "madge --circular --ts-config tsconfig.json --extensions ts ./src/",
"lint": "npx @biomejs/biome lint ./",
"lint:fix": "npx @biomejs/biome lint --write ./",
"lint:types": "tsc --noEmit",
"style": "npx @biomejs/biome format ./",
"style:fix": "npx @biomejs/biome format --write ./",
"format": "npx @biomejs/biome check --write ./",
Expand All @@ -27,8 +26,9 @@
"build:bleeding": "cross-env PKG_CACHE_PATH=\"./.pkg-cache\" gulp build:bleeding",
"build:bleedingmods": "cross-env PKG_CACHE_PATH=\"./.pkg-cache\" gulp build:bleedingmods",
"run:build": "gulp run:build",
"run:debug": "tsx ./src/entry/run.ts",
"run:debug": "npm run type-check && tsx ./src/entry/run.ts",
"run:profiler": "gulp run:profiler",
"type-check": "tsc -p tsconfig.debug.json",
"gen:types": "tsc -p tsconfig.types.json",
"gen:docs": "typedoc --options ./typedoc.json --entryPointStrategy expand ./src",
"gen:items": "tsx ./src/tools/ItemTplGenerator/ItemTplGeneratorProgram.ts",
Expand Down
2 changes: 1 addition & 1 deletion project/src/generators/BotGenerator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -442,7 +442,7 @@ export class BotGenerator {
const chosenBodyTemplate = this.databaseService.getCustomization()[bot.Customization.Body];

// Find the body/hands mapping
const matchingBody: IWildBody = bodyGlobalDict[chosenBodyTemplate?._name];
const matchingBody: IWildBody = bodyGlobalDict[chosenBodyTemplate?._name]?.[bot.Customization.Body];
if (matchingBody?.isNotRandom) {
// Has fixed hands for this body, set them
bot.Customization.Hands = matchingBody.hands;
Expand Down
2 changes: 1 addition & 1 deletion project/src/services/BotLootCacheService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ export class BotLootCacheService {
return false;
});

return this.cloner.clone(Object.fromEntries(filteredResult));
return this.cloner.clone(Object.fromEntries(filteredResult) as Record<string, number>);
}

return this.cloner.clone(result);
Expand Down
8 changes: 8 additions & 0 deletions project/tsconfig.debug.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"extends": "./tsconfig.json",
"compilerOptions": {
"strict": false,
"noEmit": true
},
"exclude": ["./types/**/*"]
}
Loading