1e41f4b71Sopenharmony_ci# ArkCompiler Subsystem Changelog 2e41f4b71Sopenharmony_ci 3e41f4b71Sopenharmony_ci## cl.arkcompiler.1 Added ArkTS Syntax Rule Compilation Check Scenario 4e41f4b71Sopenharmony_ci 5e41f4b71Sopenharmony_ci**Access Level** 6e41f4b71Sopenharmony_ci 7e41f4b71Sopenharmony_ciOthers 8e41f4b71Sopenharmony_ci 9e41f4b71Sopenharmony_ci**Reason for Change** 10e41f4b71Sopenharmony_ci 11e41f4b71Sopenharmony_ciAn interface can use a numeric literal as a property name. This does not comply with the ArkTS syntax rules. However, no compilation syntax check is provided for this scenario. 12e41f4b71Sopenharmony_ci 13e41f4b71Sopenharmony_ci**Change Impact** 14e41f4b71Sopenharmony_ci 15e41f4b71Sopenharmony_ciThis change is a non-compatible change. 16e41f4b71Sopenharmony_ci 17e41f4b71Sopenharmony_ciBefore change: An interface can declare a numeric literal as a property name. 18e41f4b71Sopenharmony_ci 19e41f4b71Sopenharmony_ci```ts 20e41f4b71Sopenharmony_ciinterface I { 21e41f4b71Sopenharmony_ci one: string, 22e41f4b71Sopenharmony_ci 2: string // no compile-time error 23e41f4b71Sopenharmony_ci} 24e41f4b71Sopenharmony_ci``` 25e41f4b71Sopenharmony_ci 26e41f4b71Sopenharmony_ciAfter change: An interface cannot use a numeric literal as a property name. 27e41f4b71Sopenharmony_ci 28e41f4b71Sopenharmony_ci```ts 29e41f4b71Sopenharmony_ciinterface I { 30e41f4b71Sopenharmony_ci one: string, 31e41f4b71Sopenharmony_ci 2: string // compile-time error 32e41f4b71Sopenharmony_ci} 33e41f4b71Sopenharmony_ci``` 34e41f4b71Sopenharmony_ci 35e41f4b71Sopenharmony_ciNumeric literals cannot be used as property names in classes and object literals. Therefore, if an interface with a numeric literal declared as a property name is used, there is no compatibility problem. 36e41f4b71Sopenharmony_ci 37e41f4b71Sopenharmony_ciThis change is incompatible only when such an interface is declared but not used. 38e41f4b71Sopenharmony_ci 39e41f4b71Sopenharmony_ci**Start API Level** 40e41f4b71Sopenharmony_ci 41e41f4b71Sopenharmony_ciAPI version 10 42e41f4b71Sopenharmony_ci 43e41f4b71Sopenharmony_ci**Change Since** 44e41f4b71Sopenharmony_ci 45e41f4b71Sopenharmony_ciOpenHarmony SDK 5.0.0.29 46e41f4b71Sopenharmony_ci 47e41f4b71Sopenharmony_ci**Key API/Component Changes** 48e41f4b71Sopenharmony_ci 49e41f4b71Sopenharmony_ciN/A 50e41f4b71Sopenharmony_ci 51e41f4b71Sopenharmony_ci**Adaptation Guide** 52e41f4b71Sopenharmony_ci 53e41f4b71Sopenharmony_ciYou are advised to change the property name from a numeric literal to a constant string or identifier in the declaration phase. For details about the description and modification method, see [Recipes](../../../application-dev/quick-start/typescript-to-arkts-migration-guide.md#recipe-objects-with-property-names-that-are-not-identifiers-are-not-supported). 54