Skip to content

使用puerts启用LGUI时会出现TS2300: Duplicate identifier问题的解决 #7

@TH7903

Description

@TH7903

在UE 5.5.4,Puerts_v8_94中出现如下问题

具体是UIEventTriggerComponent中提示的错误:
Typing/ue/ue.d.ts:230036:9 - error TS2300: Duplicate identifier 'OnPointerEnter'.
230036 OnPointerEnter: UE.LGUIEventDelegate;

Typing/ue/ue.d.ts:230037:9 - error TS2300: Duplicate identifier 'OnPointerExit'.
230037         OnPointerExit: UE.LGUIEventDelegate;
~~~~~~~~~~~~~
Typing/ue/ue.d.ts:230038:9 - error TS2300: Duplicate identifier 'OnPointerDown'.
230038         OnPointerDown: UE.LGUIEventDelegate;
~~~~~~~~~~~~~
Typing/ue/ue.d.ts:230039:9 - error TS2300: Duplicate identifier 'OnPointerUp'.
230039         OnPointerUp: UE.LGUIEventDelegate;
~~~~~~~~~~~
Typing/ue/ue.d.ts:230040:9 - error TS2300: Duplicate identifier 'OnPointerClick'.
230040         OnPointerClick: UE.LGUIEventDelegate;

Typing/ue/ue.d.ts:230041:9 - error TS2300: Duplicate identifier 'OnPointerBeginDrag'.
230041 OnPointerBeginDrag: UE.LGUIEventDelegate;

Typing/ue/ue.d.ts:230042:9 - error TS2300: Duplicate identifier 'OnPointerDrag'.
230042         OnPointerDrag: UE.LGUIEventDelegate;
~~~~~~~~~~~~~
Typing/ue/ue.d.ts:230043:9 - error TS2300: Duplicate identifier 'OnPointerEndDrag'.
230043         OnPointerEndDrag: UE.LGUIEventDelegate;
~~~~~~~~~~~~~~~~
Typing/ue/ue.d.ts:230044:9 - error TS2300: Duplicate identifier 'OnPointerDragDrop'.
230044         OnPointerDragDrop: UE.LGUIEventDelegate;
~~~~~~~~~~~~~~~~~
Typing/ue/ue.d.ts:230045:9 - error TS2300: Duplicate identifier 'OnPointerScroll'.
230045         OnPointerScroll: UE.LGUIEventDelegate;
~~~~~~~~~~~~~~~
Typing/ue/ue.d.ts:230046:9 - error TS2300: Duplicate identifier 'OnPointerSelect'.
230046         OnPointerSelect: UE.LGUIEventDelegate;
~~~~~~~~~~~~~~~
Typing/ue/ue.d.ts:230047:9 - error TS2300: Duplicate identifier 'OnPointerDeselect'.
230047         OnPointerDeselect: UE.LGUIEventDelegate;
~~~~~~~~~~~~~~~~~
Typing/ue/ue.d.ts:230052:9 - error TS2300: Duplicate identifier 'OnPointerBeginDrag'.
230052         OnPointerBeginDrag(eventData: $Nullable<UE.LGUIPointerEventData>) : boolean;

Typing/ue/ue.d.ts:230057:9 - error TS2300: Duplicate identifier 'OnPointerClick'.
230057 OnPointerClick(eventData: $Nullable<UE.LGUIPointerEventData>) : boolean;

Typing/ue/ue.d.ts:230062:9 - error TS2300: Duplicate identifier 'OnPointerDeselect'.
230062         OnPointerDeselect(eventData: $Nullable<UE.LGUIBaseEventData>) : boolean;

Typing/ue/ue.d.ts:230067:9 - error TS2300: Duplicate identifier 'OnPointerDown'.
230067 OnPointerDown(eventData: $Nullable<UE.LGUIPointerEventData>) : boolean;

Typing/ue/ue.d.ts:230072:9 - error TS2300: Duplicate identifier 'OnPointerDrag'.
230072         OnPointerDrag(eventData: $Nullable<UE.LGUIPointerEventData>) : boolean;

Typing/ue/ue.d.ts:230077:9 - error TS2300: Duplicate identifier 'OnPointerDragDrop'.
230077 OnPointerDragDrop(eventData: $Nullable<UE.LGUIPointerEventData>) : boolean;

Typing/ue/ue.d.ts:230082:9 - error TS2300: Duplicate identifier 'OnPointerEndDrag'.
230082         OnPointerEndDrag(eventData: $Nullable<UE.LGUIPointerEventData>) : boolean;
~~~~~~~~~~~~~~~~
Typing/ue/ue.d.ts:230087:9 - error TS2300: Duplicate identifier 'OnPointerEnter'.
230087         OnPointerEnter(eventData: $Nullable<UE.LGUIPointerEventData>) : boolean;
~~~~~~~~~~~~~~
Typing/ue/ue.d.ts:230092:9 - error TS2300: Duplicate identifier 'OnPointerExit'.
230092         OnPointerExit(eventData: $Nullable<UE.LGUIPointerEventData>) : boolean;
~~~~~~~~~~~~~
Typing/ue/ue.d.ts:230097:9 - error TS2300: Duplicate identifier 'OnPointerScroll'.
230097         OnPointerScroll(eventData: $Nullable<UE.LGUIPointerEventData>) : boolean;
~~~~~~~~~~~~~~~
Typing/ue/ue.d.ts:230102:9 - error TS2300: Duplicate identifier 'OnPointerSelect'.
230102         OnPointerSelect(eventData: $Nullable<UE.LGUIBaseEventData>) : boolean;
~~~~~~~~~~~~~~~
Typing/ue/ue.d.ts:230107:9 - error TS2300: Duplicate identifier 'OnPointerUp'.
230107         OnPointerUp(eventData: $Nullable<UE.LGUIPointerEventData>) : boolean;
~~~~~~~~~~~

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions