DefinitelyTyped for goja and goja-node? #661
Replies: 4 comments
-
|
There hasn't been any discussion as far as I'm aware, but neither goja, nor goja_nodejs define any types of their own (except maybe for |
Beta Was this translation helpful? Give feedback.
-
|
For example, |
Beta Was this translation helpful? Give feedback.
-
|
There is a long-standing issue about listing all ECMAScript features and their status. Unfortunately, I haven't had time for it so far. Having said that, most of the features are there, so taking es2020 as a basis is not a bad shot. As for node, very few modules have been implemented, and most of those that are implemented are incomplete, so no, I don't think there are suitable typings available. |
Beta Was this translation helpful? Give feedback.
-
|
I did a little experiment here. This builds type definitions for various modules (basically a subset of what's in DefinitelyTyped) and publishes them as separate packages to npm (https://www.npmjs.com/package/@dop251/types-goja_nodejs-url and https://www.npmjs.com/package/@dop251/types-goja_nodejs-buffer). To make use of them you need to add I didn't want to add those to DefinitrlyTyped partly because I don't think they really belong there, and partly because I'd like to fully control the release cycle, i.e. publish the modules by an automated CI job and exactly at the same time as the Go code is released. And the reason for splitting them into different packages is because the modules can be enabled or disabled individually, unlike in nodejs. I'm looking forward to comments, if there are no objections, I'm going to merge it. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Over at pocketbase/pocketbase#5512 we are having a discussion about the PocketBase JSVM typings, and I recognize that goja's core and node typings underly PocketBase's extensions.
Do you know if there has been any discussion or attempts at creating something like
@types/gojaand@types/goja-node? It would be hugely useful for anyone using TS to target a Goja environment.Beta Was this translation helpful? Give feedback.
All reactions