From 64013c747a5e9af2ed8772fe74261e7fca7be093 Mon Sep 17 00:00:00 2001 From: David Ortner Date: Thu, 21 Mar 2024 23:44:46 +0100 Subject: [PATCH] chore: [#1181] Removes the classes LocalStorage and SessionStorage as Storage is the correct class to use --- packages/happy-dom/src/event/events/IStorageEventInit.ts | 2 +- packages/happy-dom/src/event/events/StorageEvent.ts | 2 +- packages/happy-dom/src/index.ts | 6 ++---- 3 files changed, 4 insertions(+), 6 deletions(-) diff --git a/packages/happy-dom/src/event/events/IStorageEventInit.ts b/packages/happy-dom/src/event/events/IStorageEventInit.ts index 234421809..f0228cc94 100644 --- a/packages/happy-dom/src/event/events/IStorageEventInit.ts +++ b/packages/happy-dom/src/event/events/IStorageEventInit.ts @@ -1,5 +1,5 @@ import IEventInit from '../IEventInit.js'; -import { Storage } from '../../storage/Storage.js'; +import Storage from '../../storage/Storage.js'; export default interface IStorageEventInit extends IEventInit { key?: string; diff --git a/packages/happy-dom/src/event/events/StorageEvent.ts b/packages/happy-dom/src/event/events/StorageEvent.ts index 339c00738..24ea5498c 100644 --- a/packages/happy-dom/src/event/events/StorageEvent.ts +++ b/packages/happy-dom/src/event/events/StorageEvent.ts @@ -1,6 +1,6 @@ import Event from '../Event.js'; import IStorageEventInit from './IStorageEventInit.js'; -import { Storage } from '../../storage/Storage.js'; +import Storage from '../../storage/Storage.js'; /** * diff --git a/packages/happy-dom/src/index.ts b/packages/happy-dom/src/index.ts index e82e7ab37..491a9a761 100644 --- a/packages/happy-dom/src/index.ts +++ b/packages/happy-dom/src/index.ts @@ -113,7 +113,7 @@ import Range from './range/Range.js'; import ResizeObserver from './resize-observer/ResizeObserver.js'; import Screen from './screen/Screen.js'; import Selection from './selection/Selection.js'; -import { Storage, LocalStorage, SessionStorage } from './storage/Storage.js'; +import Storage from './storage/Storage.js'; import NodeFilter from './tree-walker/NodeFilter.js'; import NodeIterator from './tree-walker/NodeIterator.js'; import TreeWalker from './tree-walker/TreeWalker.js'; @@ -350,7 +350,5 @@ export { Window, XMLDocument, XMLParser, - XMLSerializer, - LocalStorage, - SessionStorage + XMLSerializer };