E143: Erased Types Can Only Be Function Types
This error occurs when the erased keyword is used in a type context that is not a function type.
The erased keyword is an experimental feature that marks function parameters as erased at runtime. When used in type annotations, erased can only appear in function types of the form (erased ...) => ....
Note: This error code is difficult to reproduce in practice because the parser typically reports E040 ("=> expected") before reaching this specific error. The E143 error may only be triggered in specific internal parsing paths.
In this article