Search Terms
empy import cannot find module symbols side deffect
Suggestion
Current behaviour: given an empty import (an import that has side effects and/or does not import any symbols):
If the module does not exist, there will be no error.
This is unlike other (non-empty) imports, which will error for non-existent modules:
import 'foo' from ./abc';
I understand this is intended behaviour as per #20534 (comment).
I would like to suggest a compiler option for people to opt-in to the stricter behaviour. This could also be added to the strict compiler option.
Checklist
My suggestion meets these guidelines:
Search Terms
empy import cannot find module symbols side deffect
Suggestion
Current behaviour: given an empty import (an import that has side effects and/or does not import any symbols):
If the module does not exist, there will be no error.
This is unlike other (non-empty) imports, which will error for non-existent modules:
I understand this is intended behaviour as per #20534 (comment).
I would like to suggest a compiler option for people to opt-in to the stricter behaviour. This could also be added to the
strictcompiler option.Checklist
My suggestion meets these guidelines: