1# Declaration merging is not supported 2 3Rule ``arkts-no-decl-merging`` 4 5**Severity: error** 6 7ArkTS does not support merging declarations. Keep all definitions of classes 8and interfaces compact in the codebase. 9 10 11## TypeScript 12 13 14``` 15 16 interface Document { 17 createElement(tagName: any): Element 18 } 19 20 interface Document { 21 createElement(tagName: string): HTMLElement 22 } 23 24 interface Document { 25 createElement(tagName: number): HTMLDivElement 26 createElement(tagName: boolean): HTMLSpanElement 27 createElement(tagName: string, value: number): HTMLCanvasElement 28 } 29 30``` 31 32## ArkTS 33 34 35``` 36 37 interface Document { 38 createElement(tagName: number): HTMLDivElement 39 createElement(tagName: boolean): HTMLSpanElement 40 createElement(tagName: string, value: number): HTMLCanvasElement 41 createElement(tagName: string): HTMLElement 42 createElement(tagName: Object): Element 43 } 44 45``` 46 47 48