1/* 2 * Copyright (c) 2024 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 * as t1 from './custom-ts-dir'; 17import { CustomClassJs } from './custom-js-dir'; 18import type { Teacher } from './custom-dts-dir'; 19import {funcPlus, TempInter} from './file1.Y.Z' 20import assert from 'assert'; 21import path from 'path' 22let ins = new t1.CustomClass(); 23assert(ins.propName === 'ts-default-name', 'success') 24assert(ins.propAge === 'ts-default-age', 'success') 25let insJs = new CustomClassJs(); 26assert(insJs.propNameJs === 'js-default-name', 'success') 27assert(insJs.propAgeJs === 'js-default-age', 'success') 28let Moli: Teacher; 29assert(funcPlus(1,2) === 3, 'success'); 30 31const fileName: string = path.basename(__filename); 32assert(fileName !== 'import_dir.ts', 'success'); 33 34class TempClass implements TempInter { 35 method(): void { 36 throw new Error('Method not implemented.'); 37 } 38}