How to add Javascript/Typescript language to plugin?

I've created a plugin based on the kotlin starter here –

I need to work with Javscript/Typescript PSI classes.   I've added the appropriate jar file (plugins/javascript-impl.jar) to Project Settings/Libraries.   I'm able to import in my kotlin code via typical import statements --

 import com.intellij.lang.javascript.psi.ecma6.impl.TypeScriptClassImpl

But when I try to build and run the plugin it fails with this : 

e: file:///F:/IdeaProjects/projectName/src/main/kotlin/com/projectName/MyClass.kt:3:37 Unresolved reference: psi

Can someone point me to the proper steps to add Javascript/Typescript psi language support to a plugin project?





I've not gotten unresolved reference to “psi”--I got past that by making sure to build vs IU/PY/etc (editions that support Typescript) as well as adding javascript-impl.jar to the Classpath in the Intellij SDK under SDKs. This is how describes the process but with the old JavaScriptLanguage plugin. It appears it no longer exists as of 2023 and now it seems to be javascript-impl. I got this working fine a year ago with JavaScriptLanguage.

However, I personally can't get past the error “com.intellij.lang.typescript.psi.TypeScriptPsiUtil” – where it says the class does not exist. It also only does so at runtime when I click the action that involves the .kt class, rather than build time.