• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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// Regular
16import {
17    regularImportFunc1FromModule1
18} from './modules/JSmodule1';
19import {
20    regularImportFunc1FromModule2 as MF1M2
21} from './modules/JSmodule2';
22import regularDefaultImportFunc1FromModule3 from './modules/JSmodule3';
23import {
24    default as regularDefaultImportFunc2FromModule2
25} from './modules/JSmodule2';
26
27// Namespace
28import * as NS from './modules/JSmodule1';
29
30// Local export
31export function LocalExportFunc() {}
32export class LocalExportClass {}
33export let LocalExportLet = 2;
34export let LocalExportVar;
35export default class LocalDefaultExportClass {}
36
37// Indirect export
38export {
39    indirectExportFunc1FromModule1
40}
41from './modules/JSmodule1';
42export {
43    indirectExportFunc2FromModule1 as MF2M1
44}
45from './modules/JSmodule1';
46
47// Star export
48export * as StarExport from './modules/JSmodule1';
49export * as StarExport2 from './modules/JSmodule2';
50export * from './modules/JSmodule2';
51
52// External import
53import ExternalImport from 'external_module';
54
55regularImportFunc1FromModule1();
56MF1M2();
57regularDefaultImportFunc1FromModule3();
58regularDefaultImportFunc2FromModule2();
59NS.namespaceImportFunc2FromModule1();
60NS.namespaceImportFunc3FromModule1();
61print(LocalExportLet);
62