import * as rawTaro from '@tarojs/taro' ; import utils from 'axios/lib/utils' ; const { isString , isObject , forEach , merge } = utils as { isString ( value ) : value is string ; isObject ( value ) : value is Record < string , string > ; forEach < T extends Record < string , any > > ( obj , fn ) : void ; merge < T extends Record < string , any > > ( ... args ) : T ; } ; function objectToQueryString ( obj ) { const result = [ ] ; forEach ( obj , ( value , key ) => { result . push ( `${ encodeURIComponent ( key ) }=${ encodeURIComponent ( value ) }` ) ; } ) ; return result . join ( '&' ) ; } function getTaro ( ) { const Taro = require ( '@tarojs/taro' ) as any ; return Taro && ( Taro as any ) . default || Taro ; } export { isString , isObject , forEach , merge , objectToQueryString , getTaro } ;