fixes strictnotnil documentation; comment unfinished sections (#21041)

fixes documentation; comment unfinished sections
This commit is contained in:
ringabout 2022-12-08 10:06:48 +08:00 • committed by GitHub
commit 4da3ead294
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -74,6 +74,8 @@ local turn on/off
--------------------- ---------------------
You can still turn off nil checking on function/module level by using a `{.strictNotNil: off.}` pragma. You can still turn off nil checking on function/module level by using a `{.strictNotNil: off.}` pragma.
..
Note: test that/TODO for code/manual. Note: test that/TODO for code/manual.
nilability state nilability state
@ -101,6 +103,7 @@ Types are either nilable or non-nilable.
When you pass a param or a default value, we use the type : for nilable types we return `MaybeNil` When you pass a param or a default value, we use the type : for nilable types we return `MaybeNil`
and for non-nilable `Safe`. and for non-nilable `Safe`.
..
TODO: fix the manual here. (This is not great, as default values for non-nilables and nilables are usually actually `nil` , so we should think a bit more about this section.) TODO: fix the manual here. (This is not great, as default values for non-nilables and nilables are usually actually `nil` , so we should think a bit more about this section.)
params rules params rules
@ -236,7 +239,7 @@ e.g.
left = nil # moving out left = nil # moving out
``` ```
..
initialization of non nilable and nilable values initialization of non nilable and nilable values
------------------------------------------------- -------------------------------------------------