v3から削除された見たいです。
Removed built-in JSON support, i.e. getJSON() and automatic stringifying in set(): use Cookies.set('foo', JSON.stringify({ ... })) and JSON.parse(Cookies.get('foo')) instead.
組み込みオブジェクトメソッドを使いましょうとのことです。
before.ts
import { set, getJSON } from "js-cookie";
// save json to cookie
const data = { /* なにかオブジェクトを */ };
set(JSON.stringify('some-key', data));
// load json to cookie
const dataFromCookie = getJSON(key);
after.ts
import { set, get } from "js-cookie";
// save json to cookie
const data = { /* なにかオブジェクトを */ };
set(JSON.stringify('some-key', data));
// load json to cookie
const dataFromCookie = JSON.parse(get(key));