mirror of
https://github.com/danielsogl/awesome-cordova-plugins.git
synced 2025-03-17 00:51:07 +08:00
Set explicit types
This commit is contained in:
parent
9e3f1cc0c6
commit
c13a53ad45
@ -424,7 +424,7 @@ export const wrap = function (
|
|||||||
pluginObj: any,
|
pluginObj: any,
|
||||||
methodName: string,
|
methodName: string,
|
||||||
opts: CordovaOptions = {}
|
opts: CordovaOptions = {}
|
||||||
) {
|
): Function {
|
||||||
return (...args: any[]) => {
|
return (...args: any[]) => {
|
||||||
if (opts.sync) {
|
if (opts.sync) {
|
||||||
// Sync doesn't wrap the plugin with a promise or observable, it returns the result as-is
|
// Sync doesn't wrap the plugin with a promise or observable, it returns the result as-is
|
||||||
@ -448,7 +448,7 @@ export function wrapInstance(
|
|||||||
pluginObj: any,
|
pluginObj: any,
|
||||||
methodName: string,
|
methodName: string,
|
||||||
opts: any = {}
|
opts: any = {}
|
||||||
) {
|
): Function {
|
||||||
return (...args: any[]) => {
|
return (...args: any[]) => {
|
||||||
if (opts.sync) {
|
if (opts.sync) {
|
||||||
return callInstance(pluginObj, methodName, args, opts);
|
return callInstance(pluginObj, methodName, args, opts);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user