Adding an accordian web part to Sharepoint

Frequent Visitor

Probably an really easy question for a lot on this forum so I apologise.

I'm trying to build an accordion webpart to use in Sharepoint. I've followed the information on the Microsoft site regarding adding a jQuery UI Accordion, using Visual Studio Code.

When I try to build the JQueryWebPart.ts file I get the following error message:


 [12:48:25] Error - [tsc] src/webparts/jQuery/JQueryWebPart.ts(20,1): error TS1128: Declaration or statement expected.
 [12:48:25] Error - 'tsc' sub task errored after 2.87 s exited with code 2
 [12:48:25] 'build' errored after 4.23 s

The first error for public is saying that a declaration or statement is expected.

The second error for super is indicating that super cells are not permitted outside constructors or in nested functions inside constructors.


Would really appreciate some assistance. Especially if there is an easier way to develop this view in SharePoint?

1 Reply
best response confirmed by CallumRaymond (Frequent Visitor)



if you look into the file JQueryWebParts.ts, look for line 20, 1st character. Your issue is there whatever that is. As for the super 


export default class DropDownWebPart extends BaseClientSideWebPart <IDropDownWebPartProps> {
  private listsIDropdownOption[];
  private listsDropDownPropertyPaneDropdown;

  public constructor() {
something like this, Hope that helps.