[@types/node] dlopen
is missing from node:process
#65252
Replies: 2 comments
-
Thanks for the discussion about "node", some useful links for everyone: Pinging the DT module owners: @microsoft, @DefinitelyTyped, @jkomyno, @alvis, @r3nya, @btoueg, @smac89, @Touffy, @DeividasBakanas, @eyqs, @Hannes-Magnusson-CK, @hoo29, @kjin, @ajafff, @islishude, @mwiktorczyk, @mohsen1, @n-e, @galkin, @parambirs, @eps1lon, @SimonSchick, @ThomasdenH, @WilcoBakker, @wwwy3y3, @samuela, @kuehlein, @bhongy, @chyzwar, @trivikr, @yoursunny, @qwelias, @ExE-Boss, @peterblazejewicz, @addaleax, @victorperin, @ZYSzys, @nodejs, @LinusU, @wafuwafu13, @mcollina, @Semigradsky. |
Beta Was this translation helpful? Give feedback.
-
Added in #69212 |
Beta Was this translation helpful? Give feedback.
-
In a Visual Studio TypeScript console project, which is using
@types/node
18.15.13, I'm trying to usedlopen
from moduleprocess
, but TypeScript compilation fails with errorError TS2339 Property 'dlopen' does not exist on type 'Process'
. Thedlopen
function is indeed present in Node and if the compiler is tricked by casting the moduleprocess
toany
it will lookup the function at runtime and work correctly. It's my understanding that TypeScript typing is coming from DefinetelyTyped definitions and in factdlopen
seems missing fromprocess.d.ts
.Expected behavior:
The following code should compile correctly in a TypeScript project.
Attached the a simple project that shows that 'dlopen' is indeed avaiable. Must be bootstrapped with
npm i
.Test_process_dlopen.zip
Beta Was this translation helpful? Give feedback.
All reactions