提交 6e9a8dd5 编写于 作者: fxy060608's avatar fxy060608

wip(uts): compiler

上级 fd185a67
{"version":3,"sources":["uni_modules/test-uniplugin/static/logo.png","uni_modules/test-uniplugin/utssdk/app-android/index.uts","uni_modules/test-uniplugin/utssdk/app-android/utils.uts","uni_modules/test-uniplugin/utssdk/app-android/login.uts","uni_modules/test-uniplugin/utssdk/app-android/interface.uts"],"sourcesContent":["import { UTSAndroid } from 'io.dcloud.uts'\nexport default UTSAndroid.getResourcePath('uni_modules/test-uniplugin/static/logo.png')\n ","import Log from 'android.util.Log'\nimport FrameLayout from 'android.widget.FrameLayout'\nimport View from 'android.view.View'\nimport { login } from 'login'\nimport { IUser } from './interface'\nimport logo from '../../static/logo.png'\n\nconst test = arrayOf(1, 2, 3)\n\ntype GetBatteryInfoOptions = {\n success?: (res: UTSJSONObject) => void\n fail?: (res: UTSJSONObject) => void\n complete?: (res: UTSJSONObject) => void\n}\nexport class User implements IUser {\n async login(name: string, pwd: string) {\n setTimeout(() => {\n console.log('timeout')\n }, 1000)\n login(name, pwd)\n for (let i = 0; i < 10; i++) {\n console.log(i)\n }\n Log.info(logo)\n\n console.log('def android')\n\n\n\n\n\n\n\n\n console.log('ndef ios')\n\n\n console.log('def android || def ios')\n\n\n\n\n const a = -3\n console.log(~a)\n new XToast<XToast<unknown>>(getUniActivity())\n .setContentView(R.layout.toast_hint)\n .setDuration(1000)\n .setImageDrawable(android.R.id.icon, R.mipmap.ic_dialog_tip_finish)\n .setText(android.R.id.message, '点我消失')\n .show()\n }\n register(name: string, callback: () => void) {\n Log.info(logo as FrameLayout)\n }\n test(view: View) {\n console.log(new TestClass())\n }\n}\nfunction login(name: string, callback: () => void) { }\n\n@Suppress(\"DEPRECATION\")\nexport function register(name: string, callback: () => void) { }\nexport function offMemoryWarning(\n callback: null | ((level: number) => void) = null\n) { }\nclass TestClass {\n\n}\n","export function test(){\n console.log('test')\n}\n","import { test } from \"./utils.uts\"\nexport function login(name: string, pwd: string) {\n console.log('login')\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S,MAAM,MAAM,EAAE,qBAAoB,EAAE;QAC3C,IAAI,IAAI,YAAS;IACnB;IACA,SAAA,KAAK,MAAM,IAAI,EAAE;QACf,QAAQ,GAAG,CAAC,AAAI;IAClB;AACF;AACA,UAAe,MAAM,MAAM,EAAE,gBAAgB,IAAI,EAAE,CAAE;AAErD,CAAC,SAAS;AAAc,IACR,SAAS,MAAM,MAAM,EAAE,qBAAoB,EAAE,CAAE;AACxD,IAAS,iBACd,2BAA6C,IAAI,EACjD,CAAE;AACJ,WAAM;AAEN"}
\ No newline at end of file
{"version":3,"sources":["uni_modules/test-uniplugin/static/logo.png","uni_modules/test-uniplugin/utssdk/app-android/index.uts","uni_modules/test-uniplugin/utssdk/app-android/utils.uts","uni_modules/test-uniplugin/utssdk/app-android/login.uts","uni_modules/test-uniplugin/utssdk/app-android/interface.uts"],"sourcesContent":["import { UTSAndroid } from 'io.dcloud.uts'\nexport default UTSAndroid.getResourcePath('uni_modules/test-uniplugin/static/logo.png')\n ","import Log from 'android.util.Log'\nimport FrameLayout from 'android.widget.FrameLayout'\nimport View from 'android.view.View'\nimport { login } from 'login'\nimport { IUser } from './interface'\nimport logo from '../../static/logo.png'\n\nconst test = arrayOf(1, 2, 3)\n\ntype GetBatteryInfoOptions = {\n success?: (res: UTSJSONObject) => void\n fail?: (res: UTSJSONObject) => void\n complete?: (res: UTSJSONObject) => void\n}\nexport class User implements IUser {\n async login(name: string, pwd: string) {\n setTimeout(() => {\n console.log('timeout')\n }, 1000)\n login(name, pwd)\n for (let i = 0; i < 10; i++) {\n console.log(i)\n }\n Log.info(logo)\n\n console.log('def android')\n\n\n\n\n\n\n\n\n console.log('ndef ios')\n\n\n console.log('def android || def ios')\n\n\n\n\n const a = -3\n console.log(~a)\n new XToast<XToast<unknown>>(getUniActivity())\n .setContentView(R.layout.toast_hint)\n .setDuration(1000)\n .setImageDrawable(android.R.id.icon, R.mipmap.ic_dialog_tip_finish)\n .setText(android.R.id.message, '点我消失')\n .show()\n }\n register(name: string, callback: () => void) {\n Log.info(logo as FrameLayout)\n }\n test(view: View) {\n console.log(new TestClass())\n }\n}\nfunction login(name: string, callback: () => void) { }\n\n@Suppress(\"DEPRECATION\")\nexport function register(name: string, callback: () => void) { }\nexport function offMemoryWarning(\n callback: null | ((level: number) => void) = null\n) { }\nclass TestClass {\n\n}\n","export function test(){\n console.log('test')\n}\n","import { test } from \"./utils.uts\"\nexport function login(name: string, pwd: string) {\n console.log('login')\n test()\n return { name, pwd }\n}\n","export interface IUser {\n register(name: string): void\n}\n"],"names":[],"mappings":";;;;;;;AAAA;ACAA,OAAgB,gBAAkB,CAAA;AAClC,OAAwB,0BAA4B,CAAA;AACpD,OAAiB,iBAAmB,CAAA;ACF7B,IAAS,OAAM;IAClB,QAAQ,GAAG,CAAC;AAChB;ACDO,IAAS,MAAM,MAAM,MAAM,EAAE,KAAK,MAAM,iBAAE;IAC/C,QAAQ,GAAG,CAAC;IACZ;IACA,OAAO;QAAE,IAAA,OAAA;QAAM,IAAA,MAAA;KAAK;AACtB;UCLiB;QACf,SAAS,MAAM,MAAM,GAAG,IAAI;;cJAf,WAAW,eAAe,CAAC;ACM1C,IAAM,QAAO,QAAQ,CAAC,EAAE,CAAC,EAAE,CAAC;AAOrB,WAAM;IACX,iBAAM,MAAM,MAAM,MAAM,EAAE,KAAK,MAAM,8CAAE;QACrC,WAAW,KAAM;YACf,QAAQ,GAAG,CAAC;QACd;UAAG,IAAI;QACP,MAAM,MAAM;YACZ;YAAK,IAAI,IAAI,CAAC;YAAd,MAAgB,IAAI,EAAE;gBACpB,QAAQ,GAAG,CAAC;gBADU;;QAExB;QACA,IAAI,IAAI;QAER,QAAQ,GAAG,CAAC;QASZ,QAAQ,GAAG,CAAC;QAGZ,QAAQ,GAAG,CAAC;QAMZ,QAAQ,GAAG,CAAC,CADF,EAAE,KACE;QACV,OAAO,OAAO,CAAO,GAAG,kBACzB,cAAc,CAAC,EAAE,MAAM,CAAC,UAAU,EAClC,WAAW,CAAC,IAAI,EAChB,gBAAgB,CAAC,QAAQ,CAAC,CAAC,EAAE,CAAC,IAAI,EAAE,EAAE,MAAM,CAAC,oBAAoB,EACjE,OAAO,CAAC,QAAQ,CAAC,CAAC,EAAE,CAAC,OAAO,EAAE,QAC9B,IAAI;IACT;IACA,aAAA,SAAS,MAAM,MAAM,EAAE,qBAAoB,EAAE;QAC3C,IAAI,IAAI,YAAS;IACnB;IACA,SAAA,KAAK,MAAM,IAAI,EAAE;QACf,QAAQ,GAAG,CAAC,AAAI;IAClB;AACF;AACA,UAAe,MAAM,MAAM,EAAE,gBAAgB,IAAI,EAAE,CAAE;AAErD,CAAC,SAAS;AAAc,IACR,SAAS,MAAM,MAAM,EAAE,qBAAoB,EAAE,CAAE;AACxD,IAAS,iBACd,2BAA6C,IAAI,EACjD,CAAE;AACJ,WAAM;AAEN"}
\ No newline at end of file
......@@ -25,11 +25,6 @@ interface IUser {
}
val default = UTSAndroid.getResourcePath("uni_modules/test-uniplugin/static/logo.png");
val test1 = arrayOf(1, 2, 3);
open class GetBatteryInfoOptions : UTSJSONObject() {
open var success: UTSCallback? = null;
open var fail: UTSCallback? = null;
open var complete: UTSCallback? = null;
}
open class User : IUser {
open suspend fun login(name: String, pwd: String) = CoroutineScope(Dispatchers.Default).async {
setTimeout(fun(){
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册