Skip to content

Commit

Permalink
fix most annoying ts-js issue here I guess
Browse files Browse the repository at this point in the history
  • Loading branch information
zardoy committed Sep 27, 2023
1 parent 443d89b commit 5bdf626
Show file tree
Hide file tree
Showing 5 changed files with 30 additions and 6 deletions.
4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
"iconify-icon": "^1.0.8",
"jszip": "^3.10.1",
"lit": "^2.8.0",
"lodash": "^4.17.21",
"lodash-es": "^4.17.21",
"minecraft-data": "^3.0.0",
"net-browserify": "github:zardoy/prismarinejs-net-browserify",
"peerjs": "^1.5.0",
Expand All @@ -56,6 +56,8 @@
"workbox-build": "^7.0.0"
},
"devDependencies": {
"@types/lodash-es": "^4.17.9",
"@types/stats.js": "^0.17.1",
"@types/three": "0.128.0",
"assert": "^2.0.0",
"browserify-zlib": "^0.2.0",
Expand Down
23 changes: 21 additions & 2 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ import serverOptions from './defaultLocalServerOptions'
import updateTime from './updateTime'

import { subscribeKey } from 'valtio/utils'
import _ from 'lodash'
import _ from 'lodash-es'

import { genTexturePackTextures, watchTexturepackInViewer } from './texturePack'
import { connectToPeer } from './localServerMultiplayer'
Expand Down
2 changes: 1 addition & 1 deletion src/inventory.ts
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ subscribe(activeModalStack, () => {
const inventoryOpened = activeModalStack.at(-1)?.reactType === 'inventory'
if (inventoryOpened) {
const inv = showInventory(undefined, getImage, {}, bot)
inv.canvas.style.zIndex = 10
inv.canvas.style.zIndex = '10'
inv.canvas.style.position = 'fixed'
inv.canvas.style.inset = '0'
// todo scaling
Expand Down
5 changes: 4 additions & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,10 @@
"allowUnreachableCode": true,
"forceConsistentCasingInFileNames": true,
"useUnknownInCatchVariables": false,
"skipLibCheck": true
"skipLibCheck": true,
// this the only options that allows smooth transition from js to ts (by not dropping types from js files)
// however might need to consider includeing *only needed libraries* instead of using this
"maxNodeModuleJsDepth": 1
// "strictNullChecks": true
},
"include": [
Expand Down

0 comments on commit 5bdf626

Please sign in to comment.