-
Notifications
You must be signed in to change notification settings - Fork 887
Should not report an error on "null" when using in type position #1265
Comments
Good catch, |
specifically, this has to do with the |
Two quick questions @yuit:
|
Okay, as far as I understand from this, no matter what the compiler options, So question two from above taken care of I think 😃 |
As for my first question, although a little different than the top-down approach TSLint normally uses, seemed easiest to just traverse through the ancestors of each found null keyword and check if any ancestor has a type kind. Theoretically this could be re-traversing a lot of nodes, but in this context the issue shouldn't arise. |
@jkillian I agree to check that |
Great, fix is merged! This will be in a release shortly |
Thanks ! 👍 |
Released in |
We are trying to add linting to our library source files and run into issue below.
Bug Report (delete this for feature requests)
@next
latest source-code built in master branch
TypeScript code being linted
with
tslint.json
:Actual behavior
Get an error
Use 'undefined' instead of 'null'
Expected behavior
There shouldn't be an error when using
null
in type positionThe text was updated successfully, but these errors were encountered: