deno_std icon indicating copy to clipboard operation
deno_std copied to clipboard

todo: enable `NoUncheckedIndexedAccess` TS compiler option

Open AZMCode opened this issue 4 years ago • 4 comments

I'm aware this is a controversial topic, however I would find it useful if Deno's std library was compatible with Typescript's new noUncheckedIndexedAccess flag, since I find my projects that use it severely handicapped. I believe dropping some assertions throughout the code (after patching assert itself), or using less indexes should be enough.

AZMCode avatar May 21 '21 18:05 AZMCode

@kt3k this belongs in deno_std as it is requesting that the std library compile without diagnostics with the noUncheckedIndexedAccess flag is set to true. Similar to the std library being strict safe, etc. It has nothing to do with the Deno CLI itself.

kitsonk avatar May 26 '21 03:05 kitsonk

@kitsonk Ah, I misread the issue.. Moving back to std.

kt3k avatar May 26 '21 03:05 kt3k

My personal opinion is that I don't mind having noUncheckedIndexedAccess "clean" code for std, I just wouldn't want to make it the default for the Deno CLI.

kitsonk avatar May 26 '21 03:05 kitsonk

I think we should add this. PRs are welcome!

iuioiua avatar Nov 29 '23 06:11 iuioiua

Closing this in favour of #4040. Thank you for the input, guys!

iuioiua avatar Dec 30 '23 06:12 iuioiua