/*
 * Copyright (c) 2024 Huawei Device Co., Ltd.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
import assert from 'assert';
interface a0 {
    (): string;
    (a: number, b: number, c?: string): number;
    new (): string;
    new (s: string): any;
    [n: number]: () => string;
    [s: string]: any;
    p1: any;
    p2: string;
    p3?: any;
    p4?: number;
    h: (s: number) => string;
    i(): any;
    j?(): any;
    k(a: string): number;
    l?(s: number): string;
}
interface a1 {
    (a: number, b: number, c?: string): number;
}
let b1: a1 = (e: number, f: number, g?: string) => 1;
assert(b1(1, 1) === 1);
interface a2 {
    new (s: string): any;
}
let b2: a2 = class {
    a: string;
    constructor(d: string) {
        this.a = d;
    }
};
let b3 = new b2("test");
assert(b3.a = "test");
interface a3 {
    p1: any;
    p2: string;
    p3?: any;
    p4?: number;
    h: (s: number) => string;
}
let b4: a3 = {
    p1: 1,
    p2: "1",
    h: (c: number) => c.toString(),
};
assert(b4.p1 === 1);
assert(b4.p2 === "1");
assert(b4.p3 === undefined);
assert(b4.p4 === undefined);
assert(b4.h(1) === "1");
interface a4 {
    i(): any;
    j?(): any;
    k(a: string): number;
    l?(s: number): string;
}
let b5: a4 = {
    i: () => 1,
    k: (b: string) => 1,
    l: (a: number) => a.toString(),
};
assert(b5.i() === 1);
assert(b5.j === undefined);
assert(b5.k("1") === 1);
assert(b5.l!(2) === "2");
