import { Cookie , CookieJar , Store } from 'tough-cookie' ; export default class Jar { public _jar : CookieJar ; constructor ( store ? ) { this . _jar = new CookieJar ( store , { looseMode : true } ) ; } setCookie ( cookieOrStr , uri , options ? ) { return this . _jar . setCookieSync ( cookieOrStr , uri , options || { } ) ; } getCookieString ( uri ) { return this . _jar . getCookieStringSync ( uri ) ; } getCookies ( uri ) { return this . _jar . getCookiesSync ( uri ) ; } }