From 87c97d7b8f29ef82af2f1673b6d3bf5316f6f0c9 Mon Sep 17 00:00:00 2001 From: guanzengkun Date: Fri, 22 Aug 2025 19:44:40 +0800 Subject: [PATCH] =?UTF-8?q?VoidCallback=20--=E3=80=8B=20()=20=3D>=20void?= =?UTF-8?q?=20Signed-off-by:guanzengkun=20?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- api/arkui/component/badge.static.d.ets | 6 ++--- .../component/calendarPicker.static.d.ets | 26 +++++++++---------- api/arkui/component/counter.static.d.ets | 13 +++++----- api/arkui/component/dataPanel.static.d.ets | 4 +-- api/arkui/component/datePicker.static.d.ets | 24 ++++++++--------- api/arkui/component/gauge.static.d.ets | 6 ++--- api/arkui/component/image.static.d.ets | 10 +++---- .../component/imageAnimator.static.d.ets | 5 ++-- .../component/loadingProgress.static.d.ets | 6 ++--- api/arkui/component/patternLock.static.d.ets | 6 ++--- api/arkui/component/progress.static.d.ets | 6 ++--- api/arkui/component/qrcode.static.d.ets | 6 ++--- api/arkui/component/textClock.static.d.ets | 4 +-- api/arkui/component/textPicker.static.d.ets | 6 ++--- api/arkui/component/textTimer.static.d.ets | 6 ++--- api/arkui/component/timePicker.static.d.ets | 26 +++++++++---------- 16 files changed, 79 insertions(+), 81 deletions(-) diff --git a/api/arkui/component/badge.static.d.ets b/api/arkui/component/badge.static.d.ets index 89a0becf3b..fa1850f453 100644 --- a/api/arkui/component/badge.static.d.ets +++ b/api/arkui/component/badge.static.d.ets @@ -19,7 +19,7 @@ * @kit ArkUI * @arkts 1.2 */ -import { ResourceColor, Length, Position, Resource, ResourceStr, VoidCallback } from "./units"; +import { ResourceColor, Length, Position, Resource, ResourceStr } from "./units"; import { FontWeight } from "./enums"; import { CommonMethod } from './common'; import { memo, ComponentBuilder } from "./../stateManagement/runtime"; @@ -242,7 +242,7 @@ export declare interface BadgeAttribute extends CommonMethod { * Defines Badge Component. * * @param { BadgeParamWithNumber | BadgeParamWithString } value - * @param { VoidCallback } [content_] - container + * @param { function } [content_] - container * @returns { BadgeAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 20 @@ -252,5 +252,5 @@ export declare interface BadgeAttribute extends CommonMethod { export declare function Badge( value: BadgeParamWithNumber | BadgeParamWithString, @memo - content_?: VoidCallback + content_?: () => void ): BadgeAttribute; diff --git a/api/arkui/component/calendarPicker.static.d.ets b/api/arkui/component/calendarPicker.static.d.ets index 4c37bfd0c8..b17e15f87a 100644 --- a/api/arkui/component/calendarPicker.static.d.ets +++ b/api/arkui/component/calendarPicker.static.d.ets @@ -21,7 +21,7 @@ */ import { Resource } from '../../global/resource'; import { CommonMethod, PickerTextStyle, Callback, BlurStyle, PickerDialogButtonStyle, ShadowOptions, ShadowStyle, HoverModeAreaType, DateRange, BackgroundBlurStyleOptions, BackgroundEffectOptions, Optional } from './common'; -import { Offset, VoidCallback, ResourceColor, VoidCallback } from "./units"; +import { Offset, ResourceColor } from "./units"; import { memo, ComponentBuilder } from "./../stateManagement/runtime"; import { AttributeModifier } from "./common"; @@ -170,11 +170,11 @@ export declare interface CalendarDialogOptions extends CalendarOptions { /** * Called when the Cancel button in the dialog is clicked. * Anonymous Object Rectification. - * @type { ?VoidCallback } + * @type { ?function } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 20 */ - onCancel?: VoidCallback; + onCancel?: function; /** * This event is triggered when a date is selected in dialog. * Anonymous Object Rectification. @@ -237,38 +237,38 @@ export declare interface CalendarDialogOptions extends CalendarOptions { * Callback function when the dialog appears. * Anonymous Object Rectification. * - * @type { ?VoidCallback } + * @type { ?function } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 20 */ - onDidAppear?: VoidCallback; + onDidAppear?: () => void; /** * Callback function when the dialog disappears. * Anonymous Object Rectification. * - * @type { ?VoidCallback } + * @type { ?function } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 20 */ - onDidDisappear?: VoidCallback; + onDidDisappear?: () => void; /** * Callback function before the dialog openAnimation starts. * Anonymous Object Rectification. * - * @type { ?VoidCallback } + * @type { ?function } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 20 */ - onWillAppear?: VoidCallback; + onWillAppear?: () => void; /** * Callback function before the dialog closeAnimation starts. * Anonymous Object Rectification. * - * @type { ?VoidCallback } + * @type { ?function } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 20 */ - onWillDisappear?: VoidCallback; + onWillDisappear?: () => void; /** * Defines the dialog's shadow. * @@ -324,7 +324,7 @@ export declare class CalendarPickerDialog { * Defines CalendarPicker Component. * * @param { CalendarOptions } [options] - calendar options. - * @param { VoidCallback } [content_] + * @param { function } [content_] * @returns { CalendarPickerAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 20 @@ -334,5 +334,5 @@ export declare class CalendarPickerDialog { export declare function CalendarPicker( options?: CalendarOptions, @memo - content_?: VoidCallback + content_?: () => void ): CalendarPickerAttribute; diff --git a/api/arkui/component/counter.static.d.ets b/api/arkui/component/counter.static.d.ets index 4b2d83dfd1..a1c0208622 100644 --- a/api/arkui/component/counter.static.d.ets +++ b/api/arkui/component/counter.static.d.ets @@ -20,7 +20,6 @@ * @arkts 1.2 */ import { CommonMethod } from './common'; -import { VoidCallback } from "./units"; import { memo, ComponentBuilder } from "./../stateManagement/runtime"; import { AttributeModifier, CommonMethod } from "./common"; @@ -37,22 +36,22 @@ export declare interface CounterAttribute extends CommonMethod { * Listen to the event that the value increases. * Anonymous Object Rectification. * - * @param { VoidCallback } event + * @param { function } event * @returns { CounterAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 20 */ - default onInc(event: VoidCallback | undefined): this; + default onInc(event: (() => void) | undefined): this; /** * Listens to the number decrease event. * Anonymous Object Rectification. * - * @param { VoidCallback } event + * @param { function } event * @returns { CounterAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 20 */ - default onDec(event: VoidCallback | undefined): this; + default onDec(event: (() => void) | undefined): this; /** * Indicates whether the decrease button of counter component is available or not. * @@ -86,7 +85,7 @@ export declare interface CounterAttribute extends CommonMethod { /** * Defines the Counter component. * - * @param { VoidCallback } [content_] + * @param { function } [content_] * @returns { CounterAttribute } The attribute of the Counter. * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 20 @@ -95,5 +94,5 @@ export declare interface CounterAttribute extends CommonMethod { @ComponentBuilder export declare function Counter( @memo - content_?: VoidCallback + content_?: () => void ): CounterAttribute; diff --git a/api/arkui/component/dataPanel.static.d.ets b/api/arkui/component/dataPanel.static.d.ets index 9e4689724e..2deff361c3 100644 --- a/api/arkui/component/dataPanel.static.d.ets +++ b/api/arkui/component/dataPanel.static.d.ets @@ -19,7 +19,7 @@ * @kit ArkUI * @arkts 1.2 */ -import { ResourceColor, Length, VoidCallback } from "./units"; +import { ResourceColor, Length } from "./units"; import { CommonMethod, ContentModifier, CommonConfiguration, MultiShadowOptions } from './common'; import { memo, ComponentBuilder } from "./../stateManagement/runtime"; import { AttributeModifier } from "./common"; @@ -250,5 +250,5 @@ export declare interface DataPanelAttribute extends CommonMethod { export declare function DataPanel( options: DataPanelOptions, @memo - content_?: VoidCallback + content_?: () => void ): DataPanelAttribute; diff --git a/api/arkui/component/datePicker.static.d.ets b/api/arkui/component/datePicker.static.d.ets index 932f9222be..2a5c804e41 100644 --- a/api/arkui/component/datePicker.static.d.ets +++ b/api/arkui/component/datePicker.static.d.ets @@ -21,7 +21,7 @@ */ import { CommonMethod, PickerTextStyle, PickerDialogButtonStyle, Rectangle, Callback, BlurStyle, ShadowOptions, ShadowStyle, HoverModeAreaType, BackgroundBlurStyleOptions, BackgroundEffectOptions, Optional, DateTimeOptions, Bindable } from './common'; -import { ResourceColor, Offset, VoidCallback } from "./units"; +import { ResourceColor, Offset } from "./units"; import { DialogAlignment } from "./alertDialog"; import { CrownSensitivity } from "./enums"; import { memo, ComponentBuilder } from "./../stateManagement/runtime"; @@ -442,11 +442,11 @@ export declare interface DatePickerDialogOptions extends DatePickerOptions { * Callback invoked when the Cancel button in the dialog box is clicked. * Anonymous Object Rectification. * - * @type { ?VoidCallback } + * @type { ?function } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 20 */ - onCancel?: VoidCallback; + onCancel?: () => void; /** * Callback invoked when the OK button in the dialog box is clicked. * @@ -524,11 +524,11 @@ export declare interface DatePickerDialogOptions extends DatePickerOptions { * this callback is not invoked. *

* - * @type { ?VoidCallback } + * @type { ?function } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 20 */ - onDidAppear?: VoidCallback; + onDidAppear?: () => void; /** * Event callback when the dialog box disappears. * @@ -537,11 +537,11 @@ export declare interface DatePickerDialogOptions extends DatePickerOptions { *
(onDateAccept/onCancel/onDateChange) > onWillDisappear > onDidDisappear. *

* - * @type { ?VoidCallback } + * @type { ?function } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 20 */ - onDidDisappear?: VoidCallback; + onDidDisappear?: () => void; /** * Event callback when the dialog box is about to appear. * @@ -552,11 +552,11 @@ export declare interface DatePickerDialogOptions extends DatePickerOptions { * The settings take effect next time the dialog box appears. *

* - * @type { ?VoidCallback } + * @type { ?function } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 20 */ - onWillAppear?: VoidCallback; + onWillAppear?: () => void; /** * Event callback when the dialog box is about to disappear. * @@ -567,11 +567,11 @@ export declare interface DatePickerDialogOptions extends DatePickerOptions { * onWillDisappear is invoked before onDidAppear. *

* - * @type { ?VoidCallback } + * @type { ?function } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 20 */ - onWillDisappear?: VoidCallback; + onWillDisappear?: () => void; /** * Shadow of the dialog box. * Default value on 2-in-1 devices: ShadowStyle.OUTER_FLOATING_MD @@ -647,5 +647,5 @@ export declare class DatePickerDialog {} export declare function DatePicker( options?: DatePickerOptions, @memo - content_?: VoidCallback + content_?: () => void ): DatePickerAttribute; diff --git a/api/arkui/component/gauge.static.d.ets b/api/arkui/component/gauge.static.d.ets index c01148a877..cfefa475c4 100644 --- a/api/arkui/component/gauge.static.d.ets +++ b/api/arkui/component/gauge.static.d.ets @@ -21,7 +21,7 @@ */ import { CommonMethod, CommonConfiguration, ContentModifier, MultiShadowOptions, Optional } from './common'; import { CustomBuilder } from './builder'; -import { ResourceStr, Dimension, ResourceColor, Length, VoidCallback } from "./units"; +import { ResourceStr, Dimension, ResourceColor, Length } from "./units"; import { LinearGradient } from "./dataPanel"; import { memo, ComponentBuilder } from "./../stateManagement/runtime"; import { AttributeModifier } from "./common"; @@ -249,7 +249,7 @@ export declare interface GaugeAttribute extends CommonMethod { * Defines the Gauge component. * * @param { GaugeOptions } options - gauge options. - * @param { VoidCallback } [content_] + * @param { function } [content_] * @returns { GaugeAttribute } The attribute of the Gauge. * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 20 @@ -259,5 +259,5 @@ export declare interface GaugeAttribute extends CommonMethod { export declare function Gauge( options: GaugeOptions, @memo - content_?: VoidCallback + content_?: () => void ): GaugeAttribute; diff --git a/api/arkui/component/image.static.d.ets b/api/arkui/component/image.static.d.ets index c396a3a10a..65bd09f1b4 100644 --- a/api/arkui/component/image.static.d.ets +++ b/api/arkui/component/image.static.d.ets @@ -25,7 +25,7 @@ import matrix4 from '../../@ohos.matrix4'; import { BusinessError } from '../../@ohos.base'; import { DrawableDescriptor } from '../../@ohos.arkui.drawableDescriptor'; import { ImageAIOptions, ImageAnalyzerConfig } from "./imageCommon"; -import { ResourceStr, ResourceColor, ColorFilter, EdgeWidths, ColorMetrics, VoidCallback } from "./units"; +import { ResourceStr, ResourceColor, ColorFilter, EdgeWidths, ColorMetrics } from "./units"; import { ImageFit, ImageRepeat, CopyOptions } from "./enums"; import { Resource } from '../../global/resource'; import { CommonMethod, PointLightStyle, PixelMap } from './common'; @@ -652,12 +652,12 @@ export declare interface ImageAttribute extends CommonMethod { *
This event is not triggered if the parameter type of the component is AnimatedDrawableDescriptor. *

* - * @param { VoidCallback | undefined } event + * @param { function | undefined } event * @returns { ImageAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 20 */ - default onFinish(event: VoidCallback | undefined): this; + default onFinish(event: (() => void) | undefined): this; /** * Sets whether to enable the AI analyzer * @@ -837,7 +837,7 @@ export declare interface ResizableOptions { * * @param { PixelMap | ResourceStr | DrawableDescriptor | ImageContent | undefined } src - image resource type. * @param { ImageAIOptions } [imageAIOptions] - Options for AI analyzer. - * @param { VoidCallback } [content_] + * @param { function } [content_] * @returns { ImageAttribute } The attribute of the Image. * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 20 @@ -848,5 +848,5 @@ export declare function Image( src: PixelMap | ResourceStr | DrawableDescriptor | ImageContent | undefined, imageAIOptions?: ImageAIOptions, @memo - content_?: VoidCallback + content_?: () => void ): ImageAttribute; diff --git a/api/arkui/component/imageAnimator.static.d.ets b/api/arkui/component/imageAnimator.static.d.ets index fa48bee2ed..c0ddbcdaac 100644 --- a/api/arkui/component/imageAnimator.static.d.ets +++ b/api/arkui/component/imageAnimator.static.d.ets @@ -22,7 +22,6 @@ import { Resource } from "../../global/resource"; import { CommonMethod, PixelMap } from './common'; import { AnimationStatus, FillMode } from "./enums"; -import { VoidCallback } from "./units"; import { memo, ComponentBuilder } from "./../stateManagement/runtime"; import { AttributeModifier } from "./common"; @@ -240,7 +239,7 @@ export declare interface ImageAnimatorAttribute extends CommonMethod { /** * Defines the ImageAnimator component. * - * @param { VoidCallback } [content_] + * @param { function } [content_] * @returns { ImageAnimatorAttribute } The attribute of the ImageAnimator. * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 20 @@ -249,5 +248,5 @@ export declare interface ImageAnimatorAttribute extends CommonMethod { @ComponentBuilder export declare function ImageAnimator( @memo - content_?: VoidCallback + content_?: () => void ): ImageAnimatorAttribute; diff --git a/api/arkui/component/loadingProgress.static.d.ets b/api/arkui/component/loadingProgress.static.d.ets index dde73bbef5..2d89bed1ad 100644 --- a/api/arkui/component/loadingProgress.static.d.ets +++ b/api/arkui/component/loadingProgress.static.d.ets @@ -20,7 +20,7 @@ * @arkts 1.2 */ import { CommonMethod, ContentModifier, CommonConfiguration } from './common'; -import { ResourceColor, VoidCallback } from "./units"; +import { ResourceColor } from "./units"; import { memo, ComponentBuilder } from "./../stateManagement/runtime"; import { AttributeModifier, CommonMethod } from "./common"; @@ -122,7 +122,7 @@ export declare interface LoadingProgressConfiguration extends CommonConfiguratio /** * Defines the LoadingProgress component. * - * @param { VoidCallback } [content_] + * @param { function } [content_] * @returns { LoadingProgressAttribute } The attribute of the LoadingProgress. * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 20 @@ -131,5 +131,5 @@ export declare interface LoadingProgressConfiguration extends CommonConfiguratio @ComponentBuilder export declare function LoadingProgress( @memo - content_?: VoidCallback + content_?: () => void ): LoadingProgressAttribute; diff --git a/api/arkui/component/patternLock.static.d.ets b/api/arkui/component/patternLock.static.d.ets index bcd8b80cf7..2c54ffeac0 100644 --- a/api/arkui/component/patternLock.static.d.ets +++ b/api/arkui/component/patternLock.static.d.ets @@ -19,7 +19,7 @@ * @kit ArkUI * @arkts 1.2 */ -import { ResourceColor, Length, VoidCallback } from "./units"; +import { ResourceColor, Length } from "./units"; import { LengthMetrics } from '../Graphics'; import { CommonMethod, Callback, Optional } from './common'; import { memo, ComponentBuilder } from "./../stateManagement/runtime"; @@ -274,7 +274,7 @@ export declare interface PatternLockAttribute extends CommonMethod { * Defines the PatternLock component. * * @param { PatternLockController } [controller] - pattern lock controller. - * @param { VoidCallback } [content_] + * @param { function } [content_] * @returns { PatternLockAttribute } The attribute of the PatternLock. * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 20 @@ -284,5 +284,5 @@ export declare interface PatternLockAttribute extends CommonMethod { export declare function PatternLock( controller?: PatternLockController, @memo - content_?: VoidCallback + content_?: () => void ): PatternLockAttribute; diff --git a/api/arkui/component/progress.static.d.ets b/api/arkui/component/progress.static.d.ets index f187b99087..7a503f9c5d 100644 --- a/api/arkui/component/progress.static.d.ets +++ b/api/arkui/component/progress.static.d.ets @@ -19,7 +19,7 @@ * @kit ArkUI * @arkts 1.2 */ -import { ResourceColor, Length, PX, VP, LPX, Font, ResourceStr, VoidCallback } from "./units"; +import { ResourceColor, Length, PX, VP, LPX, Font, ResourceStr } from "./units"; import { Resource } from '../../global/resource'; import { CommonMethod, Optional, ContentModifier, CommonConfiguration } from './common'; import { LinearGradient } from "./dataPanel"; @@ -518,7 +518,7 @@ export declare interface ProgressConfiguration extends CommonConfiguration void ): ProgressAttribute; diff --git a/api/arkui/component/qrcode.static.d.ets b/api/arkui/component/qrcode.static.d.ets index dc3c1c2c8b..449fe592de 100644 --- a/api/arkui/component/qrcode.static.d.ets +++ b/api/arkui/component/qrcode.static.d.ets @@ -20,7 +20,7 @@ * @arkts 1.2 */ import { CommonMethod } from './common'; -import { ResourceColor, ResourceStr, VoidCallback } from "./units"; +import { ResourceColor, ResourceStr } from "./units"; import { Resource } from '../../global/resource'; import { memo, ComponentBuilder } from "./../stateManagement/runtime"; import { AttributeModifier } from "./common"; @@ -74,7 +74,7 @@ export declare interface QRCodeAttribute extends CommonMethod { * Defines the QRCode component. * * @param { string } value - qrcode string. - * @param { VoidCallback } [content_] + * @param { function } [content_] * @returns { QRCodeAttribute } The attribute of the QRCode. * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 20 @@ -84,5 +84,5 @@ export declare interface QRCodeAttribute extends CommonMethod { export declare function QRCode( value: string, @memo - content_?: VoidCallback + content_?: () => void ): QRCodeAttribute; diff --git a/api/arkui/component/textClock.static.d.ets b/api/arkui/component/textClock.static.d.ets index af82f59d0e..d963013b99 100644 --- a/api/arkui/component/textClock.static.d.ets +++ b/api/arkui/component/textClock.static.d.ets @@ -270,7 +270,7 @@ export declare interface TextClockAttribute extends CommonMethod { * Defines the TextClock component. * * @param { TextClockOptions } [options] - text clock options. - * @param { VoidCallback } [content_] + * @param { function } [content_] * @returns { TextClockAttribute } The attribute of the TextClock. * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 20 @@ -280,5 +280,5 @@ export declare interface TextClockAttribute extends CommonMethod { export declare function TextClock( options?: TextClockOptions, @memo - content_?: VoidCallback + content_?: () => void ): TextClockAttribute; diff --git a/api/arkui/component/textPicker.static.d.ets b/api/arkui/component/textPicker.static.d.ets index 4db5256326..820f2eac7a 100644 --- a/api/arkui/component/textPicker.static.d.ets +++ b/api/arkui/component/textPicker.static.d.ets @@ -19,7 +19,7 @@ * @kit ArkUI * @arkts 1.2 */ -import { Resource, ResourceColor, Offset, Dimension, ResourceStr, VoidCallback } from "./units"; +import { Resource, ResourceColor, Offset, Dimension, ResourceStr } from "./units"; import { CommonMethod, PickerTextStyle, PickerDialogButtonStyle, Rectangle, BlurStyle, ShadowOptions, ShadowStyle, HoverModeAreaType, BackgroundBlurStyleOptions, BackgroundEffectOptions, Optional, Callback, Bindable, BindableResourceStr, BindableResourceStrArray } from './common'; import { DialogAlignment } from "./alertDialog"; import { CrownSensitivity, TextOverflow } from "./enums"; @@ -806,7 +806,7 @@ export declare class TextPickerDialog {} * Defines the TextPicker component. * * @param { TextPickerOptions } [options] - text picker options. - * @param { VoidCallback } [content_] + * @param { function } [content_] * @returns { TextPickerAttribute } The attribute of the TextPicker. * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 20 @@ -816,5 +816,5 @@ export declare class TextPickerDialog {} export declare function TextPicker( options?: TextPickerOptions, @memo - content_?: VoidCallback + content_?: () => void ): TextPickerAttribute; diff --git a/api/arkui/component/textTimer.static.d.ets b/api/arkui/component/textTimer.static.d.ets index 29c54fbaad..fe65ac235f 100644 --- a/api/arkui/component/textTimer.static.d.ets +++ b/api/arkui/component/textTimer.static.d.ets @@ -20,7 +20,7 @@ * @arkts 1.2 */ import { CommonConfiguration, CommonMethod, ShadowOptions, ContentModifier } from './common'; -import { ResourceColor, Length, ResourceStr, VoidCallback } from "./units"; +import { ResourceColor, Length, ResourceStr } from "./units"; import { FontStyle, FontWeight } from "./enums"; import { memo, ComponentBuilder } from "./../stateManagement/runtime"; import { AttributeModifier, CommonMethod } from "./common"; @@ -287,7 +287,7 @@ export declare interface TextTimerAttribute extends CommonMethod { * Defines the TextTimer component. * * @param { TextTimerOptions } [options] - text timer options. - * @param { VoidCallback } [content_] + * @param { function } [content_] * @returns { TextTimerAttribute } The attribute of the TextTimer. * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 20 @@ -297,5 +297,5 @@ export declare interface TextTimerAttribute extends CommonMethod { export declare function TextTimer( options?: TextTimerOptions, @memo - content_?: VoidCallback + content_?: () => void ): TextTimerAttribute; diff --git a/api/arkui/component/timePicker.static.d.ets b/api/arkui/component/timePicker.static.d.ets index 808709274b..f0756a8cae 100644 --- a/api/arkui/component/timePicker.static.d.ets +++ b/api/arkui/component/timePicker.static.d.ets @@ -19,7 +19,7 @@ * @kit ArkUI * @arkts 1.2 */ -import { ResourceColor, Offset, VoidCallback } from "./units"; +import { ResourceColor, Offset } from "./units"; import { CommonMethod, PickerTextStyle, PickerDialogButtonStyle, Rectangle, BlurStyle, ShadowOptions, ShadowStyle, HoverModeAreaType, BackgroundBlurStyleOptions, BackgroundEffectOptions, Optional, Callback, DateTimeOptions, Bindable } from './common'; import { DialogAlignment } from "./alertDialog"; import { CrownSensitivity } from "./enums"; @@ -339,11 +339,11 @@ export declare interface TimePickerDialogOptions extends TimePickerOptions { /** * Called when the Cancel button in the dialog is clicked. * - * @type { ?VoidCallback } + * @type { ?function } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 20 */ - onCancel?: VoidCallback; + onCancel?: () => void; /** * This event is triggered when a TimePicker Time or time is selected in dialog. * @@ -406,35 +406,35 @@ export declare interface TimePickerDialogOptions extends TimePickerOptions { /** * Callback function when the dialog appears. * - * @type { ?VoidCallback } + * @type { ?function } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 20 */ - onDidAppear?: VoidCallback; + onDidAppear?: () => void; /** * Callback function when the dialog disappears. * - * @type { ?VoidCallback } + * @type { ?function } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 20 */ - onDidDisappear?: VoidCallback; + onDidDisappear?: () => void; /** * Callback function before the dialog openAnimation starts. * - * @type { ?VoidCallback } + * @type { ?function } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 20 */ - onWillAppear?: VoidCallback; + onWillAppear?: () => void; /** * Callback function before the dialog closeAnimation starts. * - * @type { ?VoidCallback } + * @type { ?function } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 20 */ - onWillDisappear?: VoidCallback; + onWillDisappear?: () => void; /** * Defines the dialog's shadow. * @@ -491,7 +491,7 @@ export declare class TimePickerDialog { * Defines the TimePicker component. * * @param { TimePickerOptions } [options] - timer picker options. - * @param { VoidCallback } [content_] + * @param { function } [content_] * @returns { TimePickerAttribute } The attribute of the TimePicker. * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 20 @@ -501,5 +501,5 @@ export declare class TimePickerDialog { export declare function TimePicker( options?: TimePickerOptions, @memo - content_?: VoidCallback + content_?: () => void ): TimePickerAttribute; -- Gitee