Problems importing a p5.js library into a TypeScript project running a p5 Instance

I have recently been trying to switch from JavaScript to TypeScript, and just started a new p5.js project based on a p5.js TypeScript template

My project:

https://github.com/rsegrest/Nodes-and-Edges/tree/trying_to_import_p5.experience_library

The template I started with:

https://github.com/fal-works/p5js-template-petr-plus

Right now I am trying to see if I can use a couple of the libraries available on the p5.js website (under “Libraries”). The first I have been trying to import is called p5.experience, but I have been running into one problem after another getting it to work well with the rest of my project.

I have tried importing the p5.experience library as a script in my index.html file, and also directly inside the project. I don’t think there are any type definitions, so I am trying to bring it into my Typescript environment as Javascript, which seems to be causing a few problems.

I usually have to do a lot of configuration (and trial and error) on TypeScript projects, and have made some modifications to this template, including setting up Jest for unit testing. I had to work through configuring tsc and eslint for allowing JS file and TS files to exist side-by-side, but I believe I have that part of the puzzle worked out…(?)

However, I see that when the p5.experience.js file is loaded it is supposed to augment the functions available in p5, but it is choking on some functions like “stroke” that it may be assuming to be global.

Here is the project branch where I am trying to import the project, and the link points to the branch where I was trying and so far failing to import the library:

https://github.com/rsegrest/Nodes-and-Edges/tree/trying_to_import_p5.experience_library

Thanks for reading, and I would really appreciate any pointers or direction you all could give me, or just tell me what all I am doing wrong!