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

wip(uts): compiler

上级 a5b460c1
{"version":3,"sources":["/Users/fxy/Projects/GitHub/uni-app/uni-app-next/packages/playground/uts/utssdk/test-uts/app-android/index.uts"],"sourcesContent":["export function test(): number {\n return 1\n}\n"],"names":[],"mappings":";;;AAAO,IAAS,QAAQ,MAAM,CAAC;IAC7B,OAAO,CAAC;AACV"}
\ No newline at end of file
{"version":3,"sources":["/Users/fxy/Projects/GitHub/uni-app/uni-app-next/packages/playground/uts/utssdk/test-uts/app-android/index.uts"],"sourcesContent":["export function test(): number {\n return 1\n}\n"],"names":[],"mappings":";;;;;;AAAO,IAAS,QAAQ,MAAM,CAAC;IAC7B,OAAO,CAAC;AACV"}
\ No newline at end of file
......@@ -3,7 +3,7 @@ import UIKit;
import CoreLocation;
@objc(UTSSDKModulesTestUniPluginGetBatteryInfoOptions)
@objcMembers
class GetBatteryInfoOptions : UTSJSONObject {
class GetBatteryInfoOptions : NSObject {
public var name: String!;
public var pwd: NSNumber!;
public var success: UTSCallback?;
......
package uts.sdk.testUts;
import kotlinx.coroutines.*;
import io.dcloud.uts.runtime.*;
import kotlinx.coroutines.async;
import kotlinx.coroutines.CoroutineScope;
import kotlinx.coroutines.Deferred;
import kotlinx.coroutines.Dispatchers;
import io.dcloud.uts.*;
fun test(): Number {
return 1;
}
......@@ -137,7 +137,7 @@ describe('sourceMap', () => {
column: 15,
})
expect(res).toEqual({
line: 15,
line: 18,
column: 16,
lastColumn: null,
})
......@@ -157,7 +157,7 @@ describe('sourceMap', () => {
const { line, column, source } = await originalPositionFor({
sourceMapFile,
filename,
line: 15,
line: 18,
column: 16,
})
......
......@@ -62,7 +62,13 @@ async function testKotlin() {
output: {
outDir,
package: 'uts.sdk.testUts',
imports: ['kotlinx.coroutines.*', 'io.dcloud.uts.runtime.*'],
imports: [
'kotlinx.coroutines.async',
'kotlinx.coroutines.CoroutineScope',
'kotlinx.coroutines.Deferred',
'kotlinx.coroutines.Dispatchers',
'io.dcloud.uts.*',
],
sourceMap,
extname: 'kt',
logFilename: true,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册