{"version":3,"sources":["\\\\?\\D:\\Do\\Source\\hello-uts\\uni_modules\\uts-advance\\app-android\\utils.uts","\\\\?\\D:\\Do\\Source\\hello-uts\\uni_modules\\uts-advance\\app-android\\index.uts"],"sourcesContent":["export function log(msg: string) {\n console.log(msg);\n}\n","import { log } from \"./utils.uts\";\ntype AsyncOptions = {\n type: string;\n success: (res: string) => void;\n fail: (res: string) => void;\n complete: (res: string) => void;\n};\n/**\n * 导出一个属性\n */\nexport const MAX = 100;\n\n/**\n * 导出一个同步方法\n * @returns\n */\nexport function testSync(msg: string) {\n console.log(\"log test\");\n log(\"log test1\");\n return {\n msg: `hello ${msg}`,\n };\n}\n/**\n * 导出一个同步方法(触发了数组越界异常)\n */\nexport function testSyncError() {\n const arr: string[] = [];\n console.log(arr[1]);\n}\n/**\n * 导出一个带callback的同步方法\n * @param opts\n */\nexport function testSyncWithCallback(opts: AsyncOptions) {\n if (opts.type == \"success\") {\n opts.success(\"success\");\n } else {\n opts.fail(\"fail\");\n }\n opts.complete(\"complete\");\n return { name: \"testSyncWithCallback\" };\n}\n/**\n * 导出一个异步方法\n * @returns\n */\nexport async function testAsync(opts: AsyncOptions) {\n if (opts.type == \"success\") {\n opts.success(\"success\");\n } else {\n opts.fail(\"fail\");\n }\n opts.complete(\"complete\");\n return { name: \"testAsync\" };\n}\n\ntype TestOptions = {\n name: string;\n callback: (res: string) => void;\n};\n\nexport class Test {\n id: number;\n name: string;\n static type: string = \"Test\";\n constructor(id: number, options: TestOptions) {\n this.id = id;\n this.name = options.name;\n options.callback(\"Test.constructor\");\n }\n static testClassStaticSyncWithCallback(opts: AsyncOptions): UtsJSONObject {\n return testSyncWithCallback(opts);\n }\n static async testClassStaticAsync(opts: AsyncOptions): Promise<UtsJSONObject> {\n const res = await testAsync(opts);\n return res;\n }\n testClassSyncWithCallback(opts: AsyncOptions): UtsJSONObject {\n return testSyncWithCallback(opts);\n }\n async testClassAsync(opts: AsyncOptions): Promise<UtsJSONObject> {\n const res = await testAs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