http icon indicating copy to clipboard operation
http copied to clipboard

getCookies example in README results in TypeScript error

Open ptmkenny opened this issue 4 years ago • 0 comments

The README gives this example:

const getCookies = async () => {
  const cookies: HttpCookie[] = await Http.getCookies({
    url: 'http://example.com',
  });
};

However, when I use this exact code in my project, I get the following TypeScript error:

TS2740: Type 'HttpGetCookiesResult' is missing the following properties from type 'HttpCookie[]': length, pop, push, concat, and 29 more.

To Reproduce

http: 1.2.0 @ionic/react: 5.6.12 @capacitor/core: 3.1.1

ptmkenny avatar Sep 14 '21 08:09 ptmkenny