Resolving Functions for JS Libraries in LWC

8 views
Skip to first unread message

Peter Churchill

unread,
Jan 7, 2026, 2:25:56 PM (6 days ago) Jan 7
to Illuminated Cloud General Discussion
This is probably off topic for IC2, but figured if anyone knows, someone here might

I am using WebStorm, and I am working a lot right now with jsPDF.

Is there any way to get the functions in the jsPDF library to resolve so the type ahead works? e.g. in the screen below, it would be v helpful if I could type doc. and then setFontSize and other functions would appear like they do with Apex/JavaScript

Screenshot 2026-01-07 142244.png

Scott Wells

unread,
Jan 7, 2026, 2:27:53 PM (6 days ago) Jan 7
to Illuminated Cloud General Discussion, peternc...@gmail.com
Peter, how are you bringing in that library? Via static resource? NPM dependency? My guess is the former. Also, are you using a commercial or free JetBrains IDE? That will affect how JavaScript/TypeScript works in the editor.

Regards,
Scott Wells

Peter Churchill

unread,
Jan 7, 2026, 2:34:16 PM (6 days ago) Jan 7
to Illuminated Cloud General Discussion, sc...@illuminatedcloud.com, Peter Churchill
Yes, Static Resource and loadScript
Using a commercial version of WebStorm
WebStorm 2025.1.7
Build #WS-251.29188.1, built on October 27, 2025
Runtime version: 21.0.8+1-b895.146 aarch64 (JCEF 122.1.9)
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.

Scott Wells

unread,
Jan 7, 2026, 2:36:14 PM (6 days ago) Jan 7
to Illuminated Cloud General Discussion, peternc...@gmail.com, Scott Wells

Okay. I’ll need to look more closely, but right now I don’t think that IC is doing anything to have the IDE’s JavaScript/TypeScript system “see” loadScript (or loadStyle) as an effective import of a local file. Do you mind logging an issue in the public issue tracker for that? Hopefully it will be pretty straightforward to have those be processed as proper imports, and then things like completions, references, etc., should just work.

Regards,
Scott Wells

Reply all
Reply to author
Forward
0 new messages