index@test.uts 394 字节
Newer Older
DCloud-yyl's avatar
DCloud-yyl 已提交
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
import { ExitOptions, ExitSuccess, Exit } from "../interface.uts"
import { ExitFailImpl } from "../unierror.uts"


/**
 * 实现uni.exit
 */
export const exit : Exit = function (options: ExitOptions | null) {
	let ret : ExitSuccess ={
		errMsg: "exit:ok"
	}
  let err = new ExitFailImpl(12001);
  options?.fail?.(err)
	options?.success?.(ret)
	options?.complete?.(ret)
	// UTSAndroid.exit()
}