diff --git a/api/@ohos.arkui.UIContext.d.ts b/api/@ohos.arkui.UIContext.d.ts index 3a3f6a2317426b987f8a179865094894cccd0a79..e0f6aa0a870c658c88d3adcb9fb08aa90fb380ba 100644 --- a/api/@ohos.arkui.UIContext.d.ts +++ b/api/@ohos.arkui.UIContext.d.ts @@ -19,22 +19,22 @@ */ -import font from './@ohos.font'; -import mediaQuery from './@ohos.mediaquery'; -import type inspector from './@ohos.arkui.inspector'; -import type observer from './@ohos.arkui.observer'; -import promptAction from './@ohos.promptAction'; -import router from './@ohos.router'; -import type componentUtils from './@ohos.arkui.componentUtils'; -import { ComponentContent, FrameNode } from './@ohos.arkui.node'; -import type { AnimatorOptions, AnimatorResult } from './@ohos.animator'; -import type { Callback, AsyncCallback } from './@ohos.base'; -import { MeasureOptions } from './@ohos.measure'; -import type componentSnapshot from './@ohos.arkui.componentSnapshot'; -import type dragController from './@ohos.arkui.dragController'; -import image from './@ohos.multimedia.image'; -import type common from './@ohos.app.ability.common'; -import type pointer from './@ohos.multimodalInput.pointer'; +// import font from './@ohos.font'; +// import mediaQuery from './@ohos.mediaquery'; +// import type inspector from './@ohos.arkui.inspector'; +// import type observer from './@ohos.arkui.observer'; +// import promptAction from './@ohos.promptAction'; +// import router from './@ohos.router'; +// import type componentUtils from './@ohos.arkui.componentUtils'; +// import { ComponentContent, FrameNode } from './@ohos.arkui.node'; +// import type { AnimatorOptions, AnimatorResult } from './@ohos.animator'; +// import type { Callback, AsyncCallback } from './@ohos.base'; +// import { MeasureOptions } from './@ohos.measure'; +// import type componentSnapshot from './@ohos.arkui.componentSnapshot'; +// import type dragController from './@ohos.arkui.dragController'; +// import image from './@ohos.multimedia.image'; +// import type common from './@ohos.app.ability.common'; +// import type pointer from './@ohos.multimodalInput.pointer'; /** * class Font @@ -1327,7 +1327,7 @@ export class UIObserver { * @atomicservice * @since 12 */ - on(type: 'navDestinationUpdate', options: { navigationId: ResourceStr }, callback: Callback): void; + on(type: 'navDestinationUpdate', options: NavDestinationUpdateOptions, callback: Callback): void; /** * Removes a callback function that was previously registered with `on()`. @@ -1352,7 +1352,7 @@ export class UIObserver { * @atomicservice * @since 12 */ - off(type: 'navDestinationUpdate', options: { navigationId: ResourceStr }, callback?: Callback): void; + off(type: 'navDestinationUpdate', options: NavDestinationUpdateOptions, callback?: Callback): void; /** * Registers a callback function to be called when the navigation destination is updated. @@ -1999,6 +1999,27 @@ export interface AtomicServiceBar { setIconColor(color: Nullable< Color | number | string>): void; } +/** + * interface NavDestinationUpdateOptions + * @interface NavDestinationUpdateOptions + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 12 + */ +export interface NavDestinationUpdateOptions { + /** + * navigation resource. + * + * @type { ResourceStr } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 12 + */ + navigationId: ResourceStr; +} + /** * Represents a dynamic synchronization scene. * diff --git a/api/@ohos.arkui.observer.d.ts b/api/@ohos.arkui.observer.d.ts index 98dade1946f91c3e4d66705c567242c4fbac66f3..a0443411aa9c3687c0d89be49cad5c15b50f4caf 100644 --- a/api/@ohos.arkui.observer.d.ts +++ b/api/@ohos.arkui.observer.d.ts @@ -870,6 +870,27 @@ declare namespace uiObserver { navigationId: ResourceStr; } + /** + * interface NavDestinationUpdateOptions + * @interface NavDestinationUpdateOptions + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 12 + */ + export interface NavDestinationUpdateOptions { + /** + * navigation resource. + * + * @type { ResourceStr } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 12 + */ + navigationId: ResourceStr; + } + /** * Registers a callback function to be called when the navigation destination is updated. * @@ -891,7 +912,7 @@ declare namespace uiObserver { * @atomicservice * @since 12 */ - export function on(type: 'navDestinationUpdate', options: { navigationId: ResourceStr }, callback: Callback): void; + export function on(type: 'navDestinationUpdate', options: NavDestinationUpdateOptions, callback: Callback): void; /** * Removes a callback function that was previously registered with `on()`. @@ -916,7 +937,7 @@ declare namespace uiObserver { * @atomicservice * @since 12 */ - export function off(type: 'navDestinationUpdate', options: { navigationId: ResourceStr }, callback?: Callback): void; + export function off(type: 'navDestinationUpdate', options: NavDestinationUpdateOptions, callback?: Callback): void; /** * Registers a callback function to be called when the navigation destination is updated. diff --git a/api/arkui/AttributeUpdater.d.ts b/api/arkui/AttributeUpdater.d.ts index d84a9beda872af4a553a091777d2347d589dbf1a..d24352385d7d21f6a7777faaaab2efe838b76930 100644 --- a/api/arkui/AttributeUpdater.d.ts +++ b/api/arkui/AttributeUpdater.d.ts @@ -18,6 +18,8 @@ * @kit ArkUI */ +// import { AttributeModifier } from '../@internal/component/ets/common.d.ts' + /** * function that returns a default param of AttributeUpdater. * @@ -28,7 +30,7 @@ * @atomicservice * @since 12 */ -declare type Initializer = () => T; +export type Initializer = () => T; /** * Defines a modifier which can update attributes to native side. @@ -50,7 +52,7 @@ export declare class AttributeUpdater> implements Attribut * @atomicservice * @since 12 */ - applyNormalAttribute?(instance: T): void; + applyNormalAttribute?: (instance: T) => void; /** * Defines a function for initialization. diff --git a/api/arkui/FrameNode.d.ts b/api/arkui/FrameNode.d.ts index d98d46a539f0aabf667427c3043157e1a81a37ea..48cb68ec065d3de295be0d98410643d133c75215 100644 --- a/api/arkui/FrameNode.d.ts +++ b/api/arkui/FrameNode.d.ts @@ -84,7 +84,7 @@ declare interface LayoutConstraint { * @atomicservice * @since 12 */ -export class FrameNode { +export declare class FrameNode { /** * Constructor. * @@ -491,7 +491,7 @@ export class FrameNode { * @atomicservice * @since 12 */ - onDraw?(context: DrawContext): void; + onDraw?: (context: DrawContext) => void; /** * Method to measure the FrameNode and its content to determine the measured size. Use this method to override the @@ -705,7 +705,7 @@ export namespace typeNode { * @atomicservice * @since 12 */ - type Text = TypedFrameNode; + export type Text = TypedFrameNode; /** * Create a FrameNode of Text type. @@ -728,7 +728,7 @@ export namespace typeNode { * @atomicservice * @since 12 */ - type Column = TypedFrameNode; + export type Column = TypedFrameNode; /** * Create a FrameNode of Column type. @@ -751,7 +751,7 @@ export namespace typeNode { * @atomicservice * @since 12 */ - type Row = TypedFrameNode; + export type Row = TypedFrameNode; /** * Create a FrameNode of Row type. @@ -774,7 +774,7 @@ export namespace typeNode { * @atomicservice * @since 12 */ - type Stack = TypedFrameNode; + export type Stack = TypedFrameNode; /** * Create a FrameNode of Stack type. @@ -797,7 +797,7 @@ export namespace typeNode { * @atomicservice * @since 12 */ - type GridRow = TypedFrameNode; + export type GridRow = TypedFrameNode; /** * Create a FrameNode of GridRow type. @@ -820,7 +820,7 @@ export namespace typeNode { * @atomicservice * @since 12 */ - type GridCol = TypedFrameNode; + export type GridCol = TypedFrameNode; /** * Create a FrameNode of GridCol type. @@ -843,7 +843,7 @@ export namespace typeNode { * @atomicservice * @since 12 */ - type Flex = TypedFrameNode; + export type Flex = TypedFrameNode; /** * Create a FrameNode of Flex type. @@ -866,7 +866,7 @@ export namespace typeNode { * @atomicservice * @since 12 */ - type Swiper = TypedFrameNode; + export type Swiper = TypedFrameNode; /** * Create a FrameNode of Swiper type. @@ -889,7 +889,7 @@ export namespace typeNode { * @atomicservice * @since 12 */ - type Progress = TypedFrameNode; + export type Progress = TypedFrameNode; /** * Create a FrameNode of Progress type. @@ -912,7 +912,7 @@ export namespace typeNode { * @atomicservice * @since 12 */ - type Scroll = TypedFrameNode; + export type Scroll = TypedFrameNode; /** * Create a FrameNode of Scroll type. @@ -935,7 +935,7 @@ export namespace typeNode { * @atomicservice * @since 12 */ - type RelativeContainer = TypedFrameNode; + export type RelativeContainer = TypedFrameNode; /** * Create a FrameNode of RelativeContainer type. @@ -958,7 +958,7 @@ export namespace typeNode { * @atomicservice * @since 12 */ - type Divider = TypedFrameNode; + export type Divider = TypedFrameNode; /** * Create a FrameNode of Divider type. @@ -981,7 +981,7 @@ export namespace typeNode { * @atomicservice * @since 12 */ - type LoadingProgress = TypedFrameNode; + export type LoadingProgress = TypedFrameNode; /** * Create a FrameNode of LoadingProgress type. @@ -1004,7 +1004,7 @@ export namespace typeNode { * @atomicservice * @since 12 */ - type Search = TypedFrameNode; + export type Search = TypedFrameNode; /** * Create a FrameNode of Search type. @@ -1027,7 +1027,7 @@ export namespace typeNode { * @atomicservice * @since 12 */ - type Blank = TypedFrameNode; + export type Blank = TypedFrameNode; /** * Create a FrameNode of Blank type. @@ -1050,7 +1050,7 @@ export namespace typeNode { * @atomicservice * @since 12 */ - type Image = TypedFrameNode; + export type Image = TypedFrameNode; /** * Create a FrameNode of Image type. @@ -1073,7 +1073,7 @@ export namespace typeNode { * @atomicservice * @since 12 */ - type List = TypedFrameNode; + export type List = TypedFrameNode; /** * Create a FrameNode of List type. @@ -1096,7 +1096,7 @@ export namespace typeNode { * @atomicservice * @since 12 */ - type ListItem = TypedFrameNode; + export type ListItem = TypedFrameNode; /** * Create a FrameNode of ListItem type. @@ -1119,7 +1119,7 @@ export namespace typeNode { * @atomicservice * @since 12 */ - type TextInput = TypedFrameNode; + export type TextInput = TypedFrameNode; /** * Create a FrameNode of TextInput type. @@ -1142,7 +1142,7 @@ export namespace typeNode { * @atomicservice * @since 12 */ - type Button = TypedFrameNode; + export type Button = TypedFrameNode; /** * Create a FrameNode of Button type. @@ -1165,7 +1165,7 @@ export namespace typeNode { * @atomicservice * @since 12 */ - type ListItemGroup = TypedFrameNode; + export type ListItemGroup = TypedFrameNode; /** * Create a FrameNode of ListItemGroup type. @@ -1188,7 +1188,7 @@ export namespace typeNode { * @atomicservice * @since 12 */ - type WaterFlow = TypedFrameNode; + export type WaterFlow = TypedFrameNode; /** * Create a FrameNode of WaterFlow type. @@ -1211,7 +1211,7 @@ export namespace typeNode { * @atomicservice * @since 12 */ - type FlowItem = TypedFrameNode; + export type FlowItem = TypedFrameNode; /** * Create a FrameNode of FlowItem type. @@ -1234,7 +1234,7 @@ export namespace typeNode { * @atomicservice * @since 12 */ - type XComponent = TypedFrameNode; + export type XComponent = TypedFrameNode; /** * Create a FrameNode of XComponent type. @@ -1270,7 +1270,7 @@ export namespace typeNode { * @atomicservice * @since 13 */ - type Checkbox = TypedFrameNode; + export type Checkbox = TypedFrameNode; /** * Create a FrameNode of Checkbox type. @@ -1293,7 +1293,7 @@ export namespace typeNode { * @atomicservice * @since 13 */ - type CheckboxGroup = TypedFrameNode; + export type CheckboxGroup = TypedFrameNode; /** * Create a FrameNode of CheckboxGroup type. @@ -1316,7 +1316,7 @@ export namespace typeNode { * @atomicservice * @since 13 */ - type Radio = TypedFrameNode; + export type Radio = TypedFrameNode; /** * Create a FrameNode of Radio type. @@ -1339,7 +1339,7 @@ export namespace typeNode { * @atomicservice * @since 13 */ - type Rating = TypedFrameNode; + export type Rating = TypedFrameNode; /** * Create a FrameNode of Rating type. @@ -1362,7 +1362,7 @@ export namespace typeNode { * @atomicservice * @since 13 */ - type Select = TypedFrameNode; + export type Select = TypedFrameNode; /** * Create a FrameNode of Select type. @@ -1385,7 +1385,7 @@ export namespace typeNode { * @atomicservice * @since 13 */ - type Slider = TypedFrameNode; + export type Slider = TypedFrameNode; /** * Create a FrameNode of Slider type. @@ -1408,7 +1408,7 @@ export namespace typeNode { * @atomicservice * @since 13 */ - type Toggle = TypedFrameNode; + export type Toggle = TypedFrameNode; /** * Create a FrameNode of Toggle type. @@ -1432,7 +1432,7 @@ export namespace typeNode { * @atomicservice * @since 13 */ - type Marquee = TypedFrameNode; + export type Marquee = TypedFrameNode; /** * Create a FrameNode of Marquee type. @@ -1455,7 +1455,7 @@ export namespace typeNode { * @atomicservice * @since 13 */ - type TextArea = TypedFrameNode; + export type TextArea = TypedFrameNode; /** * Create a FrameNode of TextArea type. @@ -1478,7 +1478,7 @@ export namespace typeNode { * @atomicservice * @since 13 */ - type SymbolGlyph = TypedFrameNode; + export type SymbolGlyph = TypedFrameNode; /** * Create a FrameNode of SymbolGlyph type. @@ -1501,7 +1501,7 @@ export namespace typeNode { * @atomicservice * @since 13 */ - type QRCode = TypedFrameNode; + export type QRCode = TypedFrameNode; /** * Create a FrameNode of QRCode type. @@ -1524,7 +1524,7 @@ export namespace typeNode { * @atomicservice * @since 13 */ - type Badge = TypedFrameNode; + export type Badge = TypedFrameNode; /** * Create a FrameNode of Badge type. @@ -1547,7 +1547,7 @@ export namespace typeNode { * @atomicservice * @since 13 */ - type TextClock = TypedFrameNode; + export type TextClock = TypedFrameNode; /** * Create a FrameNode of TextClock type. @@ -1570,7 +1570,7 @@ export namespace typeNode { * @atomicservice * @since 13 */ - type TextTimer = TypedFrameNode; + export type TextTimer = TypedFrameNode; /** * Create a FrameNode of TextTimer type. @@ -1593,7 +1593,7 @@ export namespace typeNode { * @atomicservice * @since 13 */ - type Grid = TypedFrameNode; + export type Grid = TypedFrameNode; /** * Create a FrameNode of Grid type. @@ -1616,7 +1616,7 @@ export namespace typeNode { * @atomicservice * @since 13 */ - type GridItem = TypedFrameNode; + export type GridItem = TypedFrameNode; /** * Create a FrameNode of GridItem type. @@ -1639,7 +1639,7 @@ export namespace typeNode { * @atomicservice * @since 12 */ -declare class NodeAdapter { +export declare class NodeAdapter { /** * Constructor. * @@ -1750,7 +1750,7 @@ declare class NodeAdapter { * @atomicservice * @since 12 */ - onAttachToNode?(target: FrameNode): void; + onAttachToNode?: (target: FrameNode) => void; /** * This callback will be triggered when the binding is released. * @@ -1759,7 +1759,7 @@ declare class NodeAdapter { * @atomicservice * @since 12 */ - onDetachFromNode?(): void; + onDetachFromNode?:() => void; /** * Call this callback when loading for the first time or when a new node slides in.Used to generate custom IDs, developers need to ensure the uniqueness of the IDs themselves. * @@ -1770,7 +1770,7 @@ declare class NodeAdapter { * @atomicservice * @since 12 */ - onGetChildId?(index: number): number; + onGetChildId?: (index: number) => number; /** * Call this callback when loading for the first time or when a new node slides in. * @@ -1781,7 +1781,7 @@ declare class NodeAdapter { * @atomicservice * @since 12 */ - onCreateChild?(index: number): FrameNode; + onCreateChild?: (index: number) => FrameNode; /** * Called when the child node is about to be destroyed. * @@ -1792,7 +1792,7 @@ declare class NodeAdapter { * @atomicservice * @since 12 */ - onDisposeChild?(id: number, node: FrameNode): void; + onDisposeChild?: (id: number, node: FrameNode) => void; /** * Call this callback when reloading or reusing. * @@ -1803,7 +1803,7 @@ declare class NodeAdapter { * @atomicservice * @since 12 */ - onUpdateChild?(id: number, node: FrameNode): void; + onUpdateChild?: (id: number, node: FrameNode) => void; /** * Add a NodeAdapter to bind to the node.A node can only be bound to one NodeAdapter. Binding failure returns false. * diff --git a/api/arkui/Graphics.d.ts b/api/arkui/Graphics.d.ts index bf5485c8c671f1ff70594edd7f8635cebcedad5a..cee65cfa72910e8314ed1264346cbaf8d3db7ce4 100644 --- a/api/arkui/Graphics.d.ts +++ b/api/arkui/Graphics.d.ts @@ -17,7 +17,7 @@ * @file * @kit ArkUI */ -import drawing from '../@ohos.graphics.drawing'; +// import drawing from '../@ohos.graphics.drawing'; import type common2D from '../@ohos.graphics.common2D'; import { Resource } from '../global/resource';