idlize
89 строк · 3.5 Кб
1import { AppStorage, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkStructBase, CanvasRenderingContext2D, ESObject, ForEach, GestureGroup, IDataSource, ImageBitmap, Indicator, LazyForEach, LinearGradient, LocalStorage, LongPressGesture, OffscreenCanvasRenderingContext2D, PanGesture, PanGestureOptions, PatternLockController, PinchGesture, RenderingContextSettings, RichEditorController, Scroller, SearchController, SwiperController, TabsController, TapGesture, TextAreaController, TextClockController, TextInputController, TextInputOptions, TextTimerController, TransitionEffect, VideoController, WebController, XComponentController, animateTo } from "@koalaui/arkoala-arkui";2/*
3* Copyright (c) 2022-2023 Huawei Device Co., Ltd.
4* Licensed under the Apache License, Version 2.0 (the "License");
5* you may not use this file except in compliance with the License.
6* You may obtain a copy of the License at
7*
8* http://www.apache.org/licenses/LICENSE-2.0
9*
10* Unless required by applicable law or agreed to in writing, software
11* distributed under the License is distributed on an "AS IS" BASIS,
12* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13* See the License for the specific language governing permissions and
14* limitations under the License.
15*/
16export function Foo() {17return "string";18}
19export function Text() {20return "string";21}
22export class ArkStructComponent extends ArkStructBase<ArkStructComponent> {23private _entry_local_storage_ = new LocalStorage();24__initializeStruct(/**/25/** @memo */26content?: () => void, initializers?: Partial<ArkStructComponent>): void {27this._param = initializers?.param ?? (0);28}29_param!: number;30get param(): number {31return this._param;32}33set param(value: number) {34this._param = value;35}36/** @memo */37_build(/**/38/** @memo */39builder: ((instance: ArkStructComponent) => void) | undefined) { }40}
41export class ArkStructWithContentComponent extends ArkStructBase<ArkStructWithContentComponent> {42private _entry_local_storage_ = new LocalStorage();43__initializeStruct(/**/44/** @memo */45content?: () => void, initializers?: Partial<ArkStructWithContentComponent>): void {46this._param = initializers?.param ?? (0);47if (initializers?.content) {48this._content = initializers?.content;49}50if (!this._content && content)51this._content = content;52}53_param!: number;54get param(): number {55return this._param;56}57set param(value: number) {58this._param = value;59}60/** @memo */61_content!: () => void;62/** @memo */63get content(): () => void {64return this._content;65}66set content(/**/67/** @memo */68value: () => void) {69this._content = value;70}71/** @memo */72_build(/**/73/** @memo */74builder: ((instance: ArkStructWithContentComponent) => void) | undefined) {75this.content();76}77}
78/** @memo */
79export function Struct(style?: any, /**/80/** @memo */
81content?: () => void, initializers?: Partial<ArkStructComponent>): ArkStructComponent {82return ArkStructComponent._instantiate(style, () => new ArkStructComponent, content, initializers);83}
84/** @memo */
85export function StructWithContent(style?: any, /**/86/** @memo */
87content?: () => void, initializers?: Partial<ArkStructWithContentComponent>): ArkStructWithContentComponent {88return ArkStructWithContentComponent._instantiate(style, () => new ArkStructWithContentComponent, content, initializers);89}
90