Certain identifiers are acceptable in JavaScript but not in Dart. One common case where these identifiers get used is in Object properties. obj[string] can be used to give an object a property with any name.
In dart2js, JS$ can be prepended to fix certain invalid identifiers, but this won't work for identifiers that contain invalid characters. Additionally, DDC no longer supports JS$. Instead of using JS$, the generator should be able to determine which invalid identifiers are renamable and expose extension methods that rename them (by accessing the JS entity with js_util). For identifiers that aren't renamable, it should suppress that declaration and emit a warning.
Certain identifiers are acceptable in JavaScript but not in Dart. One common case where these identifiers get used is in Object properties. obj[string] can be used to give an object a property with any name.
In dart2js, JS$ can be prepended to fix certain invalid identifiers, but this won't work for identifiers that contain invalid characters. Additionally, DDC no longer supports JS$. Instead of using JS$, the generator should be able to determine which invalid identifiers are renamable and expose extension methods that rename them (by accessing the JS entity with js_util). For identifiers that aren't renamable, it should suppress that declaration and emit a warning.