Microsoft-authentication-library-for-js: Enable `"strictNullChecks": true` everywhere

Created on 6 Nov 2019  路  6Comments  路  Source: AzureAD/microsoft-authentication-library-for-js

I'm submitting a...


[ ] Regression (a behavior that used to work and stopped working in a new release)
[x] Bug report  
[ ] Performance issue
[ ] Feature request
[ ] Documentation issue or request
[ ] Other... Please describe:

Browser:

  • [ ] Chrome version XX
  • [ ] Firefox version XX
  • [ ] IE version XX
  • [ ] Edge version XX
  • [ ] Safari version XX

Library version


Library version: 1.2.0-beta.3

Current behavior

I discovered a bug where UserAgentApplication.buildIDTokenRequest was receiving an undefined AuthenticationParameters object and failing at runtime. On further investigation I could not comprehend how the calling code could compile because in the scope of the calling code the request parameter is optional. I then realised strictNullChecks was not enabled on the codebase. After enabling strictNullChecks the codebase is littered with compiler errors too numerous to be listed here.

Expected behavior

The code should compile with strictNullChecks enabled.

Minimal reproduction of the problem with instructions

Enable strictNullChecks in the base tsconfig.base.json, open the project in VSCode and see the red wiggly lines all over the place.

Most helpful comment

@freshtonic Thanks for the issue, didn't realize that was disabled, I'll definitely take a look.

All 6 comments

@freshtonic Thanks for the issue, didn't realize that was disabled, I'll definitely take a look.

@jasonnutter Is there any update on this bug? Thanks.

@ab0nent We haven't had a chance to get to this, but we will at some point soon.

We are working on this in the background, since some of the code needs to be rewritten or needs additional checks, we are taking an incremental approach. This will be updated once we have everything in place. FYI for future libraries, we are enabling this from the start.

This issue has not seen activity in 14 days. It may be closed if it remains stale.

Closing as this will no longer be picked up for version 1.x. This work will be done in 2.x, the first part of which has been started in #2602

Was this page helpful?
0 / 5 - 0 ratings

Related issues

yakimko picture yakimko  路  3Comments

lecaillon picture lecaillon  路  3Comments

ssuvorov picture ssuvorov  路  3Comments

spottedmahn picture spottedmahn  路  4Comments

LarsKemmann picture LarsKemmann  路  4Comments