Skip to content

Commit ee211e2

Browse files
committed
fix: enable user to pass in config without casting
Closes #185
1 parent 15284aa commit ee211e2

File tree

3 files changed

+9
-3
lines changed

3 files changed

+9
-3
lines changed

packages/core/components/Puck/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ export function Puck({
9898
headerTitle,
9999
headerPath,
100100
}: {
101-
config: Config;
101+
config: Config<any, any, any>;
102102
data: Data;
103103
onChange?: (data: Data) => void;
104104
onPublish: (data: Data) => void;

packages/core/components/Render/index.tsx

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,13 @@ import { rootDroppableId } from "../../lib/root-droppable-id";
44
import { Config, Data } from "../../types/Config";
55
import { DropZone, DropZoneProvider } from "../DropZone";
66

7-
export function Render({ config, data }: { config: Config; data: Data }) {
7+
export function Render({
8+
config,
9+
data,
10+
}: {
11+
config: Config<any, any, any>;
12+
data: Data;
13+
}) {
814
// DEPRECATED
915
const rootProps = data.root.props || data.root;
1016

packages/core/lib/resolve-all-data.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { resolveRootData } from "./resolve-root-data";
44

55
export const resolveAllData = async (
66
data: Data,
7-
config: Config,
7+
config: Config<any, any, any>,
88
onResolveStart?: (item: MappedItem) => void,
99
onResolveEnd?: (item: MappedItem) => void
1010
) => {

0 commit comments

Comments
 (0)