There's a snippet test for this functionality that does a local import, so I suspect we're missing something in terms auto-providing the missing library, or documenting needing to provide an explicit import.
Error: –– Pkl Error ––
Cannot find module import `typescript`.
1 | @typescript.Name { value = "MyModule" }
^^^^^^^^^^
at com.jason.MyModule (file:///Users/jasongwartz/<etc etc>/MyModule.pkl)
6 | moduleToGenerate = theModule
^^^^^^^^^
at pkl-gen-typescript-0#moduleToGenerate (file:///var/folders/dc/2s4_zwq97q58vchshpdlr9z40000gn/T/WlOGsL/pkl-gen-typescript-0.pkl)
There's a snippet test for this functionality that does a local import, so I suspect we're missing something in terms auto-providing the missing library, or documenting needing to provide an explicit import.