13af6ab5fSopenharmony_ci/* 23af6ab5fSopenharmony_ci * Copyright (c) 2023-2024 Huawei Device Co., Ltd. 33af6ab5fSopenharmony_ci * Licensed under the Apache License, Version 2.0 (the "License"); 43af6ab5fSopenharmony_ci * you may not use this file except in compliance with the License. 53af6ab5fSopenharmony_ci * You may obtain a copy of the License at 63af6ab5fSopenharmony_ci * 73af6ab5fSopenharmony_ci * http://www.apache.org/licenses/LICENSE-2.0 83af6ab5fSopenharmony_ci * 93af6ab5fSopenharmony_ci * Unless required by applicable law or agreed to in writing, software 103af6ab5fSopenharmony_ci * distributed under the License is distributed on an "AS IS" BASIS, 113af6ab5fSopenharmony_ci * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 123af6ab5fSopenharmony_ci * See the License for the specific language governing permissions and 133af6ab5fSopenharmony_ci * limitations under the License. 143af6ab5fSopenharmony_ci */ 153af6ab5fSopenharmony_ci 163af6ab5fSopenharmony_ciexport declare interface I { 173af6ab5fSopenharmony_ci f1: Object; 183af6ab5fSopenharmony_ci f2: Array<Object>; 193af6ab5fSopenharmony_ci [key: string]: Object; 203af6ab5fSopenharmony_ci} 213af6ab5fSopenharmony_ci 223af6ab5fSopenharmony_ciexport declare function foo(p: Object): void 233af6ab5fSopenharmony_ci 243af6ab5fSopenharmony_ciexport declare interface I2 { 253af6ab5fSopenharmony_ci f1?: Object; 263af6ab5fSopenharmony_ci f2?: Array<Object>; 273af6ab5fSopenharmony_ci f3?: any; 283af6ab5fSopenharmony_ci} 293af6ab5fSopenharmony_ci 303af6ab5fSopenharmony_ciexport declare interface I3 { 313af6ab5fSopenharmony_ci f1: object; 323af6ab5fSopenharmony_ci f2?: object; 333af6ab5fSopenharmony_ci f3: Array<object>; 343af6ab5fSopenharmony_ci} 353af6ab5fSopenharmony_ci 363af6ab5fSopenharmony_ciexport declare class TaskGroup {} 373af6ab5fSopenharmony_ciexport declare enum Priority { HIGH, MEDIUM, LOW } 383af6ab5fSopenharmony_ci 393af6ab5fSopenharmony_ciexport declare function bar(p: object, q?: object): void; 403af6ab5fSopenharmony_ciexport declare function applyToUnknown(fn: (a: unknown) => void); 413af6ab5fSopenharmony_ciexport declare function fooExecute(func: Function, ...args: unknown[]): Promise<unknown>; 423af6ab5fSopenharmony_ciexport declare function fooExecute(group: TaskGroup, priority?: Priority): Promise<unknown[]>; 433af6ab5fSopenharmony_ci 443af6ab5fSopenharmony_ciexport declare class C { 453af6ab5fSopenharmony_ci a?: any; 463af6ab5fSopenharmony_ci b?: { 473af6ab5fSopenharmony_ci [key: string]: Object; 483af6ab5fSopenharmony_ci }; 493af6ab5fSopenharmony_ci} 503af6ab5fSopenharmony_ciexport declare function getDynamicObject(): { 513af6ab5fSopenharmony_ci [key: string]: Object 523af6ab5fSopenharmony_ci}; 533af6ab5fSopenharmony_ciexport declare function f(a: number): void; 543af6ab5fSopenharmony_ci 553af6ab5fSopenharmony_ciexport class DynLibC {} 563af6ab5fSopenharmony_ciexport interface DynLibI {} 573af6ab5fSopenharmony_ciexport interface DynLibIC extends DynLibC {} 583af6ab5fSopenharmony_ciexport interface DynLibII extends DynLibI {} 593af6ab5fSopenharmony_ciexport class DynLibCC extends DynLibC {} 603af6ab5fSopenharmony_ciexport class DynLibCI implements DynLibI {} 613af6ab5fSopenharmony_ci 623af6ab5fSopenharmony_ciexport let dynamic_array: Array<any>; 633af6ab5fSopenharmony_ciexport declare class C1 {} 643af6ab5fSopenharmony_ci 653af6ab5fSopenharmony_ciexport declare function f2(c: C1): void; 663af6ab5fSopenharmony_ci 673af6ab5fSopenharmony_ciexport type Length = string | number | Resource; 683af6ab5fSopenharmony_ciexport interface Resource { 693af6ab5fSopenharmony_ci readonly id: number; 703af6ab5fSopenharmony_ci readonly type: number; 713af6ab5fSopenharmony_ci} 723af6ab5fSopenharmony_ciexport type Padding = { 733af6ab5fSopenharmony_ci top?: Length; 743af6ab5fSopenharmony_ci right?: Length; 753af6ab5fSopenharmony_ci bottom?: Length; 763af6ab5fSopenharmony_ci left?: Length; 773af6ab5fSopenharmony_ci} 783af6ab5fSopenharmony_ciexport type Margin = Padding; 793af6ab5fSopenharmony_ciexport interface Position { 803af6ab5fSopenharmony_ci x?: Length; 813af6ab5fSopenharmony_ci y?: Length; 823af6ab5fSopenharmony_ci} 833af6ab5fSopenharmony_ci 843af6ab5fSopenharmony_ciexport function padding(value: Padding | Length): any; 853af6ab5fSopenharmony_ciexport function margin(value: Margin | Length): any; 863af6ab5fSopenharmony_ciexport function position(value: Position): any; 873af6ab5fSopenharmony_ci 883af6ab5fSopenharmony_ciexport declare interface Resource {} 893af6ab5fSopenharmony_ciexport declare type ResourceStr = string | Resource; 903af6ab5fSopenharmony_ci 913af6ab5fSopenharmony_ciexport declare function resourceFoo(p: ResourceStr): string; 923af6ab5fSopenharmony_ci 933af6ab5fSopenharmony_ciexport declare interface Point { 943af6ab5fSopenharmony_ci x: string; 953af6ab5fSopenharmony_ci y: string; 963af6ab5fSopenharmony_ci} 973af6ab5fSopenharmony_ci 983af6ab5fSopenharmony_ciexport declare function myFoo(x: Point); 993af6ab5fSopenharmony_ciexport declare function myFoo2(x: any); 1003af6ab5fSopenharmony_ci 1013af6ab5fSopenharmony_cideclare class A { 1023af6ab5fSopenharmony_ci a: number; 1033af6ab5fSopenharmony_ci b: string; 1043af6ab5fSopenharmony_ci} 1053af6ab5fSopenharmony_ci 1063af6ab5fSopenharmony_cideclare class B { 1073af6ab5fSopenharmony_ci a: number; 1083af6ab5fSopenharmony_ci} 1093af6ab5fSopenharmony_ci 1103af6ab5fSopenharmony_ciexport declare function bad_func(): A & B; 1113af6ab5fSopenharmony_ci 1123af6ab5fSopenharmony_ciexport type IndexedSignatureType = { 1133af6ab5fSopenharmony_ci [key: string]: string; 1143af6ab5fSopenharmony_ci} 1153af6ab5fSopenharmony_ci 1163af6ab5fSopenharmony_ciexport declare function postCardAction(comp: Object, action: Object): void;