You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Regression (a behavior that used to work and stopped working in a new release)
Bug report
Performance issue
Feature request
Documentation issue or request
Other... Please describe:
Current behavior
When building with strictNullChecks=true, the following error is raised:
ERROR in node_modules/angular-token/lib/angular-token.model.d.ts(11,5): error TS2411: Property 'name' of type'string | undefined' is not assignable to string index type'string'.
node_modules/angular-token/lib/angular-token.model.d.ts(12,5): error TS2411: Property 'userType' of type'string | undefined' is not assignable to string index type'string'.
Expected behavior
No error.
What is the motivation / use case for changing the behavior?
I would like to be able to use this library with strictNullChecks set to true.
The following proposed change to the index signature should work since the RegisterData definition with the named properties allows an undefined string value for userType and name:
I'm submitting a...
Current behavior
When building with
strictNullChecks=true
, the following error is raised:Expected behavior
No error.
What is the motivation / use case for changing the behavior?
I would like to be able to use this library with
strictNullChecks
set to true.Environment
Angular-Token version: 7.0.1
Angular version: 7
Typescript version: 3.2.4 & 3.4.5
Bundler
Browser:
Others:
N/A
Notes:
The issue is with the
RegisterData
definition here:https://github.com/neroniaky/angular-token/blob/master/projects/angular-token/src/lib/angular-token.model.ts#L19
The following proposed change to the index signature should work since the RegisterData definition with the named properties allows an undefined string value for
userType
andname
:See the following for a demo of the issue and solution.
Edit: Updated environment version to indicate Typescript version.
The text was updated successfully, but these errors were encountered: