idlize
112 строк · 2.3 Кб
1/*
2* Copyright (c) 2022-2023 Huawei Device Co., Ltd.
3* Licensed under the Apache License, Version 2.0 (the "License");
4* you may not use this file except in compliance with the License.
5* You may obtain a copy of the License at
6*
7* http://www.apache.org/licenses/LICENSE-2.0
8*
9* Unless required by applicable law or agreed to in writing, software
10* distributed under the License is distributed on an "AS IS" BASIS,
11* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12* See the License for the specific language governing permissions and
13* limitations under the License.
14*/
15
16import { log } from "./util.test"
17
18/** @memo */
19export function zex(
20/** @memo */
21content: () => void,
22) {
23log("I'm zex")
24content()
25}
26
27/** @memo */
28export function til(
29arg: string,
30/** @memo */
31content: () => void,
32) {
33log(`I'm til, I have an ${arg}`)
34content()
35}
36
37/** @memo */
38export function qox(
39arg: string,
40/** @memo */
41content: () => void
42) {
43log(`I'm qox, I have an ${arg}`)
44content()
45}
46
47/** @memo */
48export function juv(
49arg: string,
50content: () => void
51) {
52log(`I'm juv, I have a ${arg}`)
53}
54
55
56/** @memo */
57export function accessId(
58arg: string,
59/** @memo */
60content: () => void,
61) {
62log(`I'm accessId, I have an ${arg}`)
63content()
64}
65
66export class Zan {
67/** @memo */
68rek(msg: string) {
69log(`I'm rek the member. I have an ${msg}`)
70}
71
72/** @memo */
73cep(
74arg: string,
75/** @memo */
76content: () => void
77) {
78log(`I'm cep the member. I have an ${arg}, ${this === undefined}`)
79content()
80}
81}
82
83/** @memo */
84export function kla(
85arg: string,
86/** @memo */
87por: (n: string) => string,
88los: (n: string) => string,
89) {
90log(por("funny") + " " + arg)
91log(los("happy") + " " + arg)
92}
93
94/** @memo */
95export function ryq(arg: string, adv: string) {
96kla(
97arg,
98/** @memo */
99(s):string => s + " ui cow " + adv,
100(s):string => s + " non-ui goat " + adv
101)
102}
103
104/** @memo */
105export function bae(arg: string, adv: string) {
106kla(
107arg,
108/** @memo */
109function(s): string { return s + " ui pig " + adv },
110function(s): string { return s + " non-ui horse " + adv }
111)
112}
113