Merge pull request #39 from saleor/change-debug-import

Change "debug" package import to use default
This commit is contained in:
Lukasz Ostrowski 2022-08-30 11:56:57 +02:00 committed by GitHub
commit 69c985bdc1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,4 +1,4 @@
import { debug as createDebug } from "debug"; import debugPkg from "debug";
import { Actions } from "./actions"; import { Actions } from "./actions";
import { AppBridgeState, AppBridgeStateContainer } from "./app-bridge-state"; import { AppBridgeState, AppBridgeStateContainer } from "./app-bridge-state";
@ -12,7 +12,7 @@ type SubscribeMap = {
[type in EventType]: Record<symbol, EventCallback<PayloadOfEvent<type>>>; [type in EventType]: Record<symbol, EventCallback<PayloadOfEvent<type>>>;
}; };
const debug = createDebug("AppBridge"); const debug = debugPkg.debug("AppBridge");
function eventStateReducer(state: AppBridgeState, event: Events) { function eventStateReducer(state: AppBridgeState, event: Events) {
debug("Event reducer received event: %j", event); debug("Event reducer received event: %j", event);