smogon / Porygon-Z

The Bot for the Official Smogon Discord (WIP)
https://discord.gg/smogon
MIT License
13 stars 6 forks source link

Enable strict typechecking #3

Closed monsanto closed 5 years ago

monsanto commented 5 years ago

"strict": true in tsconfig.json compilerOptions.

Currently cannot build due to the following type error:

src/command_base.ts:37:3 - error TS2322: Type 'string | undefined' is not assignable to type 'string'.
  Type 'undefined' is not assignable to type 'string'.

37      this.cmd = parts.shift();
        ~~~~~~~~
HoeenCoder commented 5 years ago

I thought I enabled strict checks, I guess I missed that whoops.