Skip to content

Commit

Permalink
Remove outdated comment about Parcel workaround
Browse files Browse the repository at this point in the history
  • Loading branch information
Andarist committed Jul 2, 2023
1 parent 4f7006f commit 6e68158
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 18 deletions.
7 changes: 2 additions & 5 deletions packages/react-resizable-panels/src/Panel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -195,11 +195,8 @@ export const Panel = forwardRef<ImperativePanelHandle, PanelProps>(
createElement(PanelWithForwardedRef, { ...props, forwardedRef: ref })
);

// Workaround for Parcel scope hoisting (which renames objects/functions).
// Casting to :any is required to avoid corrupting the generated TypeScript types.
// See github.com/parcel-bundler/parcel/issues/8724
(PanelWithForwardedRef as any).displayName = "Panel";
(Panel as any).displayName = "forwardRef(Panel)";
PanelWithForwardedRef.displayName = "Panel";
Panel.displayName = "forwardRef(Panel)";

// HACK
function parseSizeFromStyle(style: CSSProperties): number {
Expand Down
5 changes: 1 addition & 4 deletions packages/react-resizable-panels/src/PanelContexts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,4 @@ export const PanelGroupContext = createContext<{
unregisterPanel: (id: string) => void;
} | null>(null);

// Workaround for Parcel scope hoisting (which renames objects/functions).
// Casting to :any is required to avoid corrupting the generated TypeScript types.
// See github.com/parcel-bundler/parcel/issues/8724
(PanelGroupContext as any).displayName = "PanelGroupContext";
PanelGroupContext.displayName = "PanelGroupContext";
7 changes: 2 additions & 5 deletions packages/react-resizable-panels/src/PanelGroup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -768,8 +768,5 @@ export const PanelGroup = forwardRef<
createElement(PanelGroupWithForwardedRef, { ...props, forwardedRef: ref })
);

// Workaround for Parcel scope hoisting (which renames objects/functions).
// Casting to :any is required to avoid corrupting the generated TypeScript types.
// See github.com/parcel-bundler/parcel/issues/8724
(PanelGroupWithForwardedRef as any).displayName = "PanelGroup";
(PanelGroup as any).displayName = "forwardRef(PanelGroup)";
PanelGroupWithForwardedRef.displayName = "PanelGroup";
PanelGroup.displayName = "forwardRef(PanelGroup)";
5 changes: 1 addition & 4 deletions packages/react-resizable-panels/src/PanelResizeHandle.ts
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,4 @@ export function PanelResizeHandle({
});
}

// Workaround for Parcel scope hoisting (which renames objects/functions).
// Casting to :any is required to avoid corrupting the generated TypeScript types.
// See github.com/parcel-bundler/parcel/issues/8724
(PanelResizeHandle as any).displayName = "PanelResizeHandle";
PanelResizeHandle.displayName = "PanelResizeHandle";

0 comments on commit 6e68158

Please sign in to comment.