|
|
|
|
|
by conaclos
1224 days ago
|
|
(1) Yes this makes interoperability hard. However, `typeof` is generally used to test the type of value. It is unlikely to pass its value to a function If you use a function declared in a module with a distinct edition, you have to comply to its contract. And its contract certainly state that "null" is not a valid value to pass through. Moreover, a type checker or linter could error/warn about this. (2) You are right. Another solution might be to introduce a new keyword: ```js
use "edition2023"
```
Old browser could thus crash. In the same way that they did for ESM. |
|