Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Velpro187
uni-app
提交
14278bb9
U
uni-app
项目概览
Velpro187
/
uni-app
与 Fork 源项目一致
Fork自
DCloud / uni-app
通知
1
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
U
uni-app
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
14278bb9
编写于
7月 21, 2022
作者:
fxy060608
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
wip(uts): compiler
上级
0d299c60
变更
10
显示空白变更内容
内联
并排
Showing
10 changed file
with
168 addition
and
153 deletion
+168
-153
.prettierignore
.prettierignore
+2
-1
packages/uni-app-plus/build.json
packages/uni-app-plus/build.json
+1
-1
packages/uni-app-plus/dist/uni-app-view.umd.js
packages/uni-app-plus/dist/uni-app-view.umd.js
+1
-1
packages/uni-app-plus/dist/uni.compiler.js
packages/uni-app-plus/dist/uni.compiler.js
+6
-4
packages/uni-app-plus/src/compiler/index.ts
packages/uni-app-plus/src/compiler/index.ts
+3
-1
packages/uni-h5/dist/uni-h5.cjs.js
packages/uni-h5/dist/uni-h5.cjs.js
+21
-19
packages/uni-h5/dist/uni-h5.es.js
packages/uni-h5/dist/uni-h5.es.js
+11
-20
packages/uni-uts-vite/lib/module.js
packages/uni-uts-vite/lib/module.js
+78
-77
packages/uni-uts-vite/module.ts
packages/uni-uts-vite/module.ts
+1
-0
packages/uni-uts-vite/src/plugins/v1.ts
packages/uni-uts-vite/src/plugins/v1.ts
+44
-29
未找到文件。
.prettierignore
浏览文件 @
14278bb9
...
@@ -18,3 +18,4 @@ packages/uni-mp-vue/lib
...
@@ -18,3 +18,4 @@ packages/uni-mp-vue/lib
packages/uni-mp-weixin/lib
packages/uni-mp-weixin/lib
packages/uni-mp-quickapp-webview/lib
packages/uni-mp-quickapp-webview/lib
packages/vite-plugin-uni/lib
packages/vite-plugin-uni/lib
packages/uni-uts-vite/lib
\ No newline at end of file
packages/uni-app-plus/build.json
浏览文件 @
14278bb9
...
@@ -6,7 +6,7 @@
...
@@ -6,7 +6,7 @@
"output"
:
{
"output"
:
{
"format"
:
"cjs"
"format"
:
"cjs"
},
},
"external"
:
[
"@dcloudio/uni-app-vite"
]
"external"
:
[
"@dcloudio/uni-app-vite"
,
"@dcloudio/uni-uts-vite"
]
},
},
{
{
"input"
:
{
"input"
:
{
...
...
packages/uni-app-plus/dist/uni-app-view.umd.js
浏览文件 @
14278bb9
因为 它太大了无法显示 source diff 。你可以改为
查看blob
。
packages/uni-app-plus/dist/uni.compiler.js
浏览文件 @
14278bb9
'
use strict
'
;
'
use strict
'
;
var
uniAppVite
=
require
(
'
@dcloudio/uni-app-vite
'
);
var
appVite
=
require
(
'
@dcloudio/uni-app-vite
'
);
var
utsVite
=
require
(
'
@dcloudio/uni-uts-vite
'
);
function
_interopDefaultLegacy
(
e
)
{
return
e
&&
typeof
e
===
'
object
'
&&
'
default
'
in
e
?
e
:
{
'
default
'
:
e
};
}
function
_interopDefaultLegacy
(
e
)
{
return
e
&&
typeof
e
===
'
object
'
&&
'
default
'
in
e
?
e
:
{
'
default
'
:
e
};
}
var
uniAppVite__default
=
/*#__PURE__*/
_interopDefaultLegacy
(
uniAppVite
);
var
appVite__default
=
/*#__PURE__*/
_interopDefaultLegacy
(
appVite
);
var
utsVite__default
=
/*#__PURE__*/
_interopDefaultLegacy
(
utsVite
);
var
index
=
[
appVite__default
[
"
default
"
],
utsVite__default
[
"
default
"
]];
module
.
exports
=
index
;
module
.
exports
=
uniAppVite__default
[
"
default
"
];
packages/uni-app-plus/src/compiler/index.ts
浏览文件 @
14278bb9
export
{
default
}
from
'
@dcloudio/uni-app-vite
'
import
appVite
from
'
@dcloudio/uni-app-vite
'
import
utsVite
from
'
@dcloudio/uni-uts-vite
'
export
default
[
appVite
,
utsVite
]
packages/uni-h5/dist/uni-h5.cjs.js
浏览文件 @
14278bb9
...
@@ -386,8 +386,21 @@ function createNativeEvent(evt, htmlElement = false) {
...
@@ -386,8 +386,21 @@ function createNativeEvent(evt, htmlElement = false) {
event
.
touches
=
evt
.
touches
;
event
.
touches
=
evt
.
touches
;
event
.
changedTouches
=
evt
.
changedTouches
;
event
.
changedTouches
=
evt
.
changedTouches
;
}
}
{
wrapperEvent
(
event
,
evt
);
}
return
event
;
return
event
;
}
}
function
wrapperEvent
(
event
,
evt
)
{
shared
.
extend
(
event
,
{
preventDefault
()
{
return
evt
.
preventDefault
();
},
stopPropagation
()
{
return
evt
.
stopPropagation
();
}
});
}
const
invokeOnCallback
=
(
name
,
res
)
=>
UniServiceJSBridge
.
emit
(
"
api.
"
+
name
,
res
);
const
invokeOnCallback
=
(
name
,
res
)
=>
UniServiceJSBridge
.
emit
(
"
api.
"
+
name
,
res
);
let
invokeViewMethodId
=
1
;
let
invokeViewMethodId
=
1
;
function
publishViewMethodName
()
{
function
publishViewMethodName
()
{
...
@@ -1644,15 +1657,10 @@ function resolveColor(color) {
...
@@ -1644,15 +1657,10 @@ function resolveColor(color) {
color
[
3
]
=
color
[
3
]
/
255
;
color
[
3
]
=
color
[
3
]
/
255
;
return
"
rgba(
"
+
color
.
join
(
"
,
"
)
+
"
)
"
;
return
"
rgba(
"
+
color
.
join
(
"
,
"
)
+
"
)
"
;
}
}
function
processTouches
(
target
,
touches
)
{
function
processTouches
(
rect
,
touches
)
{
const
eventTarget
=
target
;
Array
.
from
(
touches
).
forEach
((
touch
)
=>
{
let
boundingClientRect
=
eventTarget
.
getBoundingClientRect
();
touch
.
x
=
touch
.
clientX
-
rect
.
left
;
return
Array
.
from
(
touches
).
map
((
touch
)
=>
{
touch
.
y
=
touch
.
clientY
-
rect
.
top
;
return
{
identifier
:
touch
.
identifier
,
x
:
touch
.
clientX
-
boundingClientRect
.
left
,
y
:
touch
.
clientY
-
boundingClientRect
.
top
};
});
});
}
}
let
tempCanvas
;
let
tempCanvas
;
...
@@ -1755,16 +1763,10 @@ function useListeners(props2, Listeners, trigger) {
...
@@ -1755,16 +1763,10 @@ function useListeners(props2, Listeners, trigger) {
let
eventHandler
=
[];
let
eventHandler
=
[];
if
(
existing
)
{
if
(
existing
)
{
eventHandler
.
push
(
withWebEvent
((
$event
)
=>
{
eventHandler
.
push
(
withWebEvent
((
$event
)
=>
{
trigger
(
event
.
replace
(
"
on
"
,
""
).
toLocaleLowerCase
(),
shared
.
extend
({},
(()
=>
{
const
rect
=
$event
.
currentTarget
.
getBoundingClientRect
();
let
obj
=
{};
processTouches
(
rect
,
$event
.
touches
);
for
(
const
key
in
$event
)
{
processTouches
(
rect
,
$event
.
changedTouches
);
obj
[
key
]
=
$event
[
key
];
trigger
(
event
.
replace
(
"
on
"
,
""
).
toLocaleLowerCase
(),
$event
);
}
return
obj
;
})(),
{
touches
:
processTouches
(
$event
.
currentTarget
,
$event
.
touches
),
changedTouches
:
processTouches
(
$event
.
currentTarget
,
$event
.
changedTouches
)
}));
}));
}));
}
}
if
(
props2
.
disableScroll
&&
event
===
"
onTouchmove
"
)
{
if
(
props2
.
disableScroll
&&
event
===
"
onTouchmove
"
)
{
...
...
packages/uni-h5/dist/uni-h5.es.js
浏览文件 @
14278bb9
...
@@ -1271,7 +1271,6 @@ function $nne(evt, eventValue, instance2) {
...
@@ -1271,7 +1271,6 @@ function $nne(evt, eventValue, instance2) {
res.changedTouches = normalizeTouchEvent(evt.changedTouches, top);
res.changedTouches = normalizeTouchEvent(evt.changedTouches, top);
}
}
{
{
wrapperEvent(res, evt);
return wrapperH5WxsEvent(res, eventValue, instance2) || [res];
return wrapperH5WxsEvent(res, eventValue, instance2) || [res];
}
}
}
}
...
@@ -1297,6 +1296,9 @@ function createNativeEvent(evt, htmlElement = false) {
...
@@ -1297,6 +1296,9 @@ function createNativeEvent(evt, htmlElement = false) {
event.touches = evt.touches;
event.touches = evt.touches;
event.changedTouches = evt.changedTouches;
event.changedTouches = evt.changedTouches;
}
}
{
wrapperEvent(event, evt);
}
return event;
return event;
}
}
function wrapperEvent(event, evt) {
function wrapperEvent(event, evt) {
...
@@ -6559,15 +6561,10 @@ function resolveColor(color) {
...
@@ -6559,15 +6561,10 @@ function resolveColor(color) {
color[3] = color[3] / 255;
color[3] = color[3] / 255;
return "rgba(" + color.join(",") + ")";
return "rgba(" + color.join(",") + ")";
}
}
function processTouches(target, touches) {
function processTouches(rect, touches) {
const eventTarget = target;
Array.from(touches).forEach((touch) => {
let boundingClientRect = eventTarget.getBoundingClientRect();
touch.x = touch.clientX - rect.left;
return Array.from(touches).map((touch) => {
touch.y = touch.clientY - rect.top;
return {
identifier: touch.identifier,
x: touch.clientX - boundingClientRect.left,
y: touch.clientY - boundingClientRect.top
};
});
});
}
}
let tempCanvas;
let tempCanvas;
...
@@ -6673,16 +6670,10 @@ function useListeners(props2, Listeners, trigger) {
...
@@ -6673,16 +6670,10 @@ function useListeners(props2, Listeners, trigger) {
let eventHandler = [];
let eventHandler = [];
if (existing) {
if (existing) {
eventHandler.push(withWebEvent(($event) => {
eventHandler.push(withWebEvent(($event) => {
trigger(event.replace("on", "").toLocaleLowerCase(), extend({}, (() => {
const rect = $event.currentTarget.getBoundingClientRect();
let obj = {};
processTouches(rect, $event.touches);
for (const key in $event) {
processTouches(rect, $event.changedTouches);
obj[key] = $event[key];
trigger(event.replace("on", "").toLocaleLowerCase(), $event);
}
return obj;
})(), {
touches: processTouches($event.currentTarget, $event.touches),
changedTouches: processTouches($event.currentTarget, $event.changedTouches)
}));
}));
}));
}
}
if (props2.disableScroll && event === "onTouchmove") {
if (props2.disableScroll && event === "onTouchmove") {
...
...
packages/uni-uts-vite/lib/module.js
浏览文件 @
14278bb9
const
moduleName
=
'
__MODULE_NAME__
'
const
moduleName
=
'
__MODULE_NAME__
'
;
const
moduleDefine
=
'
__MODULE_DEFINE__
'
const
moduleDefine
=
'
__MODULE_DEFINE__
'
;
var
module
=
initModule
(
moduleDefine
)
var
module
=
initModule
(
moduleDefine
)
;
let
callbackId
=
1
let
callbackId
=
1
;
const
objectToString
=
Object
.
prototype
.
toString
const
objectToString
=
Object
.
prototype
.
toString
;
const
toTypeString
=
(
value
)
=>
objectToString
.
call
(
value
)
const
toTypeString
=
(
value
)
=>
objectToString
.
call
(
value
)
;
const
isPlainObject
=
(
val
)
=>
toTypeString
(
val
)
===
'
[object Object]
'
const
isPlainObject
=
(
val
)
=>
toTypeString
(
val
)
===
'
[object Object]
'
;
const
callbacks
=
{}
const
callbacks
=
{}
;
function
normalizeArg
(
arg
)
{
function
normalizeArg
(
arg
)
{
if
(
typeof
arg
===
'
function
'
)
{
if
(
typeof
arg
===
'
function
'
)
{
const
id
=
callbackId
++
const
id
=
callbackId
++
;
callbacks
[
id
]
=
arg
callbacks
[
id
]
=
arg
;
return
id
return
id
;
}
else
if
(
isPlainObject
(
arg
))
{
}
else
if
(
isPlainObject
(
arg
))
{
Object
.
keys
(
arg
).
forEach
((
name
)
=>
{
Object
.
keys
(
arg
).
forEach
((
name
)
=>
{
arg
[
name
]
=
normalizeArg
(
arg
[
name
])
;
})
arg
[
name
]
=
normalizeArg
(
arg
[
name
]);
});
}
}
return
arg
return
arg
;
}
}
function
isProxyInvokeCallbackResponse
(
res
)
{
function
isProxyInvokeCallbackResponse
(
res
)
{
return
!!
res
.
name
return
!!
res
.
name
;
}
}
function
moduleGetter
(
proxy
,
module
,
method
,
defines
)
{
function
moduleGetter
(
proxy
,
module
,
method
,
defines
)
{
const
invokeCallback
=
({
id
,
name
,
params
,
keepAlive
})
=>
{
const
invokeCallback
=
({
id
,
name
,
params
,
keepAlive
,
})
=>
{
const
callback
=
callbacks
[
id
]
const
callback
=
callbacks
[
id
];
if
(
callback
)
{
if
(
callback
)
{
callback
(...
params
)
callback
(...
params
);
if
(
!
keepAlive
)
{
if
(
!
keepAlive
)
{
delete
callbacks
[
id
]
delete
callbacks
[
id
];
}
}
}
else
{
console
.
error
(
`
${
module
}
.
${
method
}
${
name
}
is not found`
)
}
}
else
{
console
.
error
(
`
${
module
}
.
${
method
}
${
name
}
is not found`
);
}
}
};
return
(...
args
)
=>
{
return
(...
args
)
=>
{
const
params
=
args
.
map
((
arg
)
=>
normalizeArg
(
arg
))
const
params
=
args
.
map
((
arg
)
=>
normalizeArg
(
arg
));
const
invokeArgs
=
{
module
,
method
,
params
,
async
:
!!
defines
.
async
}
const
invokeArgs
=
{
module
,
method
,
params
,
async
:
!!
defines
.
async
};
if
(
defines
.
async
)
{
if
(
defines
.
async
)
{
return
new
Promise
((
resolve
,
reject
)
=>
{
return
new
Promise
((
resolve
,
reject
)
=>
{
proxy
.
invoke
(
invokeArgs
,
(
res
)
=>
{
proxy
.
invoke
(
invokeArgs
,
(
res
)
=>
{
if
(
isProxyInvokeCallbackResponse
(
res
))
{
if
(
isProxyInvokeCallbackResponse
(
res
))
{
invokeCallback
(
res
)
invokeCallback
(
res
);
}
else
{
}
else
{
if
(
res
.
errMsg
)
{
if
(
res
.
errMsg
)
{
reject
(
res
.
errMsg
)
reject
(
res
.
errMsg
);
}
else
{
resolve
(
res
.
params
)
}
}
else
{
resolve
(
res
.
params
);
}
}
})
})
}
}
return
proxy
.
invoke
(
invokeArgs
,
invokeCallback
)
});
});
}
}
return
proxy
.
invoke
(
invokeArgs
,
invokeCallback
);
};
}
}
function
initModule
(
moduleDefine
)
{
function
initModule
(
moduleDefine
)
{
let
proxy
let
proxy
;
const
moduleProxy
=
{}
const
moduleProxy
=
{};
for
(
const
methodName
in
moduleDefine
)
{
for
(
const
methodName
in
moduleDefine
)
{
Object
.
defineProperty
(
moduleProxy
,
methodName
,
{
Object
.
defineProperty
(
moduleProxy
,
methodName
,
{
enumerable
:
true
,
enumerable
:
true
,
configurable
:
true
,
configurable
:
true
,
get
:
()
=>
{
get
:
()
=>
{
if
(
!
proxy
)
{
if
(
!
proxy
)
{
proxy
=
uni
.
requireNativePlugin
(
'
proxy-module
'
)
proxy
=
uni
.
requireNativePlugin
(
'
proxy-module
'
);
}
}
return
moduleGetter
(
return
moduleGetter
(
proxy
,
moduleName
,
methodName
,
moduleDefine
[
methodName
]);
proxy
,
moduleName
,
methodName
,
moduleDefine
[
methodName
]
)
},
},
})
});
}
}
return
moduleProxy
;
}
}
export
{
module
as
default
,
normalizeArg
}
export
{
module
as
default
,
normalizeArg
}
;
packages/uni-uts-vite/module.ts
浏览文件 @
14278bb9
...
@@ -119,4 +119,5 @@ function initModule(moduleDefine: Record<string, ModuleMethodDefine>) {
...
@@ -119,4 +119,5 @@ function initModule(moduleDefine: Record<string, ModuleMethodDefine>) {
},
},
})
})
}
}
return
moduleProxy
}
}
packages/uni-uts-vite/src/plugins/v1.ts
浏览文件 @
14278bb9
import
type
{
Plugin
}
from
'
vite
'
import
type
{
Plugin
}
from
'
vite
'
import
fs
from
'
fs
'
import
fs
from
'
fs
'
import
path
from
'
path
'
import
path
from
'
path
'
import
{
parseJson
,
parseVueRequest
}
from
'
@dcloudio/uni-cli-shared
'
import
{
normalizePath
,
parseVueRequest
}
from
'
@dcloudio/uni-cli-shared
'
import
{
import
{
ExportDefaultDeclaration
,
ExportDefaultDeclaration
,
Module
,
Module
,
TsFunctionType
,
TsType
,
TsTypeAnnotation
,
TsTypeAnnotation
,
}
from
'
../../types/types
'
}
from
'
../../types/types
'
// 需要区分 android,iOS
// 需要区分 android,iOS
...
@@ -15,40 +17,22 @@ export function uniUtsV1Plugin(): Plugin {
...
@@ -15,40 +17,22 @@ export function uniUtsV1Plugin(): Plugin {
name
:
'
uni:uts-v1
'
,
name
:
'
uni:uts-v1
'
,
apply
:
'
build
'
,
apply
:
'
build
'
,
enforce
:
'
pre
'
,
enforce
:
'
pre
'
,
resolveId
(
id
)
{
async
transform
(
code
,
id
,
opts
)
{
if
(
!
id
.
includes
(
'
uni_modules
'
))
{
return
}
const
pkgPath
=
path
.
join
(
id
,
'
package.json
'
)
if
(
!
fs
.
existsSync
(
pkgPath
))
{
return
}
const
pkg
=
parseJson
(
fs
.
readFileSync
(
pkgPath
,
'
utf-8
'
))
if
(
pkg
.
uni_modules
?.
type
!==
'
uts
'
)
{
return
}
return
(
path
.
join
(
id
,
pkg
.
main
||
'
interface.uts
'
)
+
'
?module=
'
+
path
.
basename
(
path
.
dirname
(
pkgPath
))
)
},
transform
(
code
,
id
,
opts
)
{
if
(
opts
&&
opts
.
ssr
)
{
if
(
opts
&&
opts
.
ssr
)
{
return
return
}
}
const
{
filename
,
query
}
=
parseVueRequest
(
id
)
const
{
filename
}
=
parseVueRequest
(
id
)
if
(
path
.
extname
(
filename
)
!==
'
.uts
'
)
{
if
(
path
.
extname
(
filename
)
!==
'
.uts
'
)
{
return
return
}
}
const
moduleName
=
(
query
as
any
).
module
as
string
const
moduleName
=
parseModuleId
(
filename
)
if
(
!
moduleName
)
{
if
(
!
moduleName
)
{
return
return
}
}
// 懒加载 uts
// 懒加载 uts
// eslint-disable-next-line no-restricted-globals
// eslint-disable-next-line no-restricted-globals
const
{
parse
}
=
require
(
'
@dcloudio/uts
'
)
const
{
parse
}
=
require
(
'
@dcloudio/uts
'
)
const
ast
=
parse
(
code
)
const
ast
=
await
parse
(
code
)
if
(
!
moduleCode
)
{
if
(
!
moduleCode
)
{
moduleCode
=
fs
.
readFileSync
(
moduleCode
=
fs
.
readFileSync
(
path
.
resolve
(
__dirname
,
'
../../lib/module.js
'
),
path
.
resolve
(
__dirname
,
'
../../lib/module.js
'
),
...
@@ -62,6 +46,15 @@ export function uniUtsV1Plugin(): Plugin {
...
@@ -62,6 +46,15 @@ export function uniUtsV1Plugin(): Plugin {
}
}
}
}
function
parseModuleId
(
filepath
:
string
)
{
const
parts
=
normalizePath
(
filepath
).
split
(
'
/
'
)
const
index
=
parts
.
findIndex
((
part
)
=>
part
===
'
uni_modules
'
)
if
(
index
>
-
1
)
{
return
parts
[
index
+
1
]
}
return
''
}
function
parseModuleDefines
(
ast
:
Module
)
{
function
parseModuleDefines
(
ast
:
Module
)
{
const
module
:
Record
<
string
,
{
async
:
boolean
}
>
=
{}
const
module
:
Record
<
string
,
{
async
:
boolean
}
>
=
{}
const
defaultDecl
=
ast
.
body
.
find
(
const
defaultDecl
=
ast
.
body
.
find
(
...
@@ -72,17 +65,39 @@ function parseModuleDefines(ast: Module) {
...
@@ -72,17 +65,39 @@ function parseModuleDefines(ast: Module) {
}
}
const
body
=
defaultDecl
.
decl
.
body
.
body
const
body
=
defaultDecl
.
decl
.
body
.
body
body
.
forEach
((
item
)
=>
{
body
.
forEach
((
item
)
=>
{
if
(
item
.
type
!==
'
TsMethodSignature
'
||
item
.
key
.
type
!==
'
Identifier
'
)
{
if
(
item
.
type
===
'
TsPropertySignature
'
)
{
const
{
key
,
typeAnnotation
}
=
item
if
(
key
.
type
!==
'
Identifier
'
)
{
return
}
if
(
!
typeAnnotation
)
{
return
}
const
functionType
=
typeAnnotation
.
typeAnnotation
if
(
!
isFunctionType
(
functionType
))
{
return
}
const
methodName
=
key
.
value
module
[
methodName
]
=
{
async
:
isReturnPromise
(
functionType
.
typeAnnotation
),
}
}
else
if
(
item
.
type
===
'
TsMethodSignature
'
)
{
if
(
item
.
key
.
type
!==
'
Identifier
'
)
{
return
return
}
}
const
methodName
=
item
.
key
.
value
const
methodName
=
item
.
key
.
value
module
[
methodName
]
=
{
module
[
methodName
]
=
{
async
:
item
.
typeAnn
?
isReturnPromise
(
item
.
typeAnn
)
:
false
,
async
:
item
.
typeAnn
?
isReturnPromise
(
item
.
typeAnn
)
:
false
,
}
}
}
})
})
return
module
return
module
}
}
function
isFunctionType
(
type
:
TsType
):
type
is
TsFunctionType
{
return
type
.
type
===
'
TsFunctionType
'
}
function
isReturnPromise
({
typeAnnotation
}:
TsTypeAnnotation
)
{
function
isReturnPromise
({
typeAnnotation
}:
TsTypeAnnotation
)
{
return
(
return
(
typeAnnotation
.
type
===
'
TsTypeReference
'
&&
typeAnnotation
.
type
===
'
TsTypeReference
'
&&
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录