Skip to content

Commit 987a73d

Browse files
committed
chore: fix typings after pwt upgrade
1 parent 1fd50d1 commit 987a73d

3 files changed

Lines changed: 4 additions & 4 deletions

File tree

packages/pluggableWidgets/pusher-web/src/Pusher.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ export default function Pusher(props: PusherContainerProps): ReactElement {
2626
}, []);
2727

2828
// Build channel name based on the object
29-
const channelName = getChannelName(objectSource as any); // TODO: fix typings when PWT updated.
29+
const channelName = getChannelName(objectSource);
3030

3131
// Setup stable subscription config
3232
const subscription = useMemo(() => {

packages/pluggableWidgets/pusher-web/src/utils/getChannelName.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { DynamicValue, ObjectItem } from "mendix";
22

33
export function getChannelName(objectSource: DynamicValue<ObjectItem>): string | undefined {
4-
const object = objectSource.value as ObjectItem | undefined;
4+
const object = objectSource.value;
55

66
if (!object) {
77
return undefined;

packages/pluggableWidgets/pusher-web/typings/PusherProps.d.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,15 @@
33
* WARNING: All changes made to this file will be overwritten
44
* @author Mendix Widgets Framework Team
55
*/
6+
import { ActionValue, DynamicValue, ObjectItem } from "mendix";
67
import { CSSProperties } from "react";
7-
import { ActionValue, ListValue } from "mendix";
88

99
export interface PusherContainerProps {
1010
name: string;
1111
class: string;
1212
style?: CSSProperties;
1313
tabIndex?: number;
14-
objectSource: ListValue;
14+
objectSource: DynamicValue<ObjectItem>;
1515
notifyActionName: string;
1616
notifyEventAction?: ActionValue;
1717
}

0 commit comments

Comments
 (0)