runejs / server

RuneJS is a RuneScape game server written in TypeScript and JavaScript. The goal of the project is to create a comprehensive game engine, while also providing simple and easy to use content development systems and APIs.
GNU General Public License v3.0
238 stars 82 forks source link

build: ♻️ 👷 🔧 turn on `strictNullChecks` #392

Closed Jameskmonger closed 1 year ago

Jameskmonger commented 1 year ago

I apologise for the size of this PR 😓

This PR enables strictNullChecks and fixes all 600+ issues that were uncovered by that check. It also enables strictBindCallApply, but there weren't any errors from that.

It also converts two plugins to TypeScript (rs:hans and rs:transform_command).

I have tested the game and appears to still be working. I avoided changing functionality wherever possible, mostly these changes are to TypeScript type annotations only.


from this: image

to this: image