diff --git a/api/arkui/component/forEach.static.d.ets b/api/arkui/component/forEach.static.d.ets index 146b19604e9651e1e06c2469baa9c2525c4d3623..ec3842da6b1dd8596729153cce5d561e011da4e3 100644 --- a/api/arkui/component/forEach.static.d.ets +++ b/api/arkui/component/forEach.static.d.ets @@ -25,24 +25,24 @@ import { Builder } from './builder'; * * @typedef { function } ItemGeneratorFunc * @param { T } item - item in an array - * @param { number } index - index corresponding to an array item. + * @param { int } index - index corresponding to an array item. * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 20 */ @Builder -declare type ItemGeneratorFunc = (item: T, index: number) => void; +declare type ItemGeneratorFunc = (item: T, index: int) => void; /** * Define key generator function. * * @typedef { function } KeyGeneratorFunc * @param { T } item - item in an array - * @param { number } index - index corresponding to an array item. + * @param { int } index - index corresponding to an array item. * @returns {string} Character string generated based on item and index * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 20 */ -declare type KeyGeneratorFunc = (item: T, index: number) => string; +declare type KeyGeneratorFunc = (item: T, index: int) => string; /** * Defines ForEach Component. diff --git a/api/arkui/component/lazyForEach.static.d.ets b/api/arkui/component/lazyForEach.static.d.ets index 9b39b039955a1c6379fbf16e5f2ecad8127bc644..cda0fd53bfd2cbb9bce2fb21b8599f5ba3397195 100644 --- a/api/arkui/component/lazyForEach.static.d.ets +++ b/api/arkui/component/lazyForEach.static.d.ets @@ -92,21 +92,21 @@ export interface DataAddOperation { /** * Index of added data. * - * @type { number } + * @type { int } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 20 */ - index: number; + index: int; /** * Count of added data in one operation * Only validate for ADD and DELETE. * - * @type { ?number } + * @type { ?int } * @default 1 * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 20 */ - count?: number; + count?: int; /** * Key of added data. * @@ -136,21 +136,21 @@ export interface DataDeleteOperation { /** * Index of deleted data. * - * @type { number } + * @type { int } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 20 */ - index: number; + index: int; /** * Count of deleted data in one operation * Only validate for ADD and DELETE. * - * @type { ?number } + * @type { ?int } * @default 1 * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 20 */ - count?: number; + count?: int; } /** @@ -172,11 +172,11 @@ export interface DataChangeOperation { /** * Index of changed data. * - * @type { number } + * @type { int } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 20 */ - index: number; + index: int; /** * Key of changed data. * @@ -198,19 +198,19 @@ export interface MoveIndex { /** * Index of moved data. * - * @type { number } + * @type { int } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 20 */ - from: number; + from: int; /** * Destination of moved data. * - * @type { number } + * @type { int } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 20 */ - to: number; + to: int; } /** @@ -224,19 +224,19 @@ export interface ExchangeIndex { /** * Index of the first exchange data. * - * @type { number } + * @type { int } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 20 */ - start: number; + start: int; /** * Index of the second exchange data. * - * @type { number } + * @type { int } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 20 */ - end: number; + end: int; } /** @@ -380,36 +380,36 @@ export interface DataChangeListener { /** * Data added. * - * @param { number } index + * @param { int } index * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 20 */ - onDataAdd(index: number): void; + onDataAdd(index: int): void; /** * Data moved. * - * @param { number } from - * @param { number } to + * @param { int } from + * @param { int } to * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 20 */ - onDataMove(from: number, to: number): void; + onDataMove(from: int, to: int): void; /** * Data deleted. * - * @param { number } index + * @param { int } index * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 20 */ - onDataDelete(index: number): void; + onDataDelete(index: int): void; /** * Call when has data change. * - * @param { number } index + * @param { int } index * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 20 */ - onDataChange(index: number): void; + onDataChange(index: int): void; /** * Call when multiple data change. * @@ -431,20 +431,20 @@ export interface IDataSource { /** * Total data count. * - * @returns { number } + * @returns { int } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 20 */ - totalCount(): number; + totalCount(): int; /** * Return the data of index. * - * @param { number } index + * @param { int } index * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 20 */ - getData(index: number): T; + getData(index: int): T; /** * Register data change listener. * @@ -477,24 +477,24 @@ export interface LazyForEachAttribute {} * * @typedef { function } ItemGeneratorFunc * @param { T } item - item in an array - * @param { number } index - index corresponding to an array item. + * @param { int } index - index corresponding to an array item. * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 20 */ @Builder -declare type ItemGeneratorFunc = (item: T, index: number) => void; +declare type ItemGeneratorFunc = (item: T, index: int) => void; /** * Define key generator function. * * @typedef { function } KeyGeneratorFunc * @param { T } item - item in an array - * @param { number } index - index corresponding to an array item. + * @param { int } index - index corresponding to an array item. * @returns {string} Character string generated based on item and index * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 20 */ -declare type KeyGeneratorFunc = (item: T, index: number) => string; +declare type KeyGeneratorFunc = (item: T, index: int) => string; /** * Enter the value to obtain the LazyForEach. diff --git a/api/arkui/component/repeat.static.d.ets b/api/arkui/component/repeat.static.d.ets index 0d9490370ea995395ed5f0ec478b778a123b4e67..cc412c318e177a36e1e9217f2cd8457a11defd4e 100644 --- a/api/arkui/component/repeat.static.d.ets +++ b/api/arkui/component/repeat.static.d.ets @@ -35,12 +35,12 @@ type RepeatArray = Array | ReadonlyArray | Readonly>; * * @typedef {function} TemplateTypedFunc * @param { T } item - data item. - * @param { number } index - data index number in array. + * @param { int } index - data index in array. * @returns { string } template type. * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 20 */ -type TemplateTypedFunc = (item: T, index: number) => string; +type TemplateTypedFunc = (item: T, index: int) => string; /** * Define builder function to render one template type. * @@ -71,44 +71,44 @@ export interface RepeatItem { /** * index of each item. * - * @type { number } + * @type { int } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 20 */ - index: number; + index: int; } /** * Function that is used to do lazy loading. * * @typedef {function} OnLazyLoadingFunc - * @param { number } index - data index. + * @param { int } index - data index. * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 20 */ -type OnLazyLoadingFunc = (index: number) => void; +type OnLazyLoadingFunc = (index: int) => void; /** * Define key generator function. * * @typedef {function} KeyGeneratorFunc * @param { T } item - data item. - * @param { number } index - data index number in array. + * @param { int } index - data index in array. * @returns { string } key value. * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 20 */ -type KeyGeneratorFunc = (item: T, index: number) => string; +type KeyGeneratorFunc = (item: T, index: int) => string; /** * Function that is used to get total count. * * @typedef {function} OnTotalCountFunc - * @returns { number } Returns the total data count + * @returns { int } Returns the total data count * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 20 */ -type OnTotalCountFunc = () => number; +type OnTotalCountFunc = () => int; /** * Define the options of repeat virtualScroll to implement reuse and lazy loading. @@ -121,11 +121,11 @@ export interface VirtualScrollOptions { /** * Total data count. * - * @type { ?number } + * @type { ?int } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 20 */ - totalCount?: number; + totalCount?: int; /** * Reuse or not. * @@ -173,11 +173,11 @@ export interface TemplateOptions { /** * The cached number of each template. * - * @type { ?number } + * @type { ?int } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 20 */ - cachedCount?: number; + cachedCount?: int; } /**