[Pkg-javascript-devel] typescript-types removal
Jonas Smedegaard
jonas at jones.dk
Sat Jan 2 04:31:01 GMT 2021
Quoting Xavier (2020-11-05 12:07:40)
> following a previous discussion, I'm working to embed all @types/foo
> into node-foo.
> * DONE: many
> * TODO: backbone (Jonas, can you do it?), lodash, handlebars, jsdom,
> marked, mathjax, minimist, requirejs, sax, semver, shelljs,
> sizzle, underscore
>
> There will be 2 @types/foo remaining after and we've to decide where to
> put them:
> * @types/node: embed in nodejs in or in node-typescript ?
> I prefer to embed in nodejs to have the @types/node who matches to
> current nodejs (see #964637)
> * @types/estree: embed directly in node-typescript ?
I have finally wrapped my head around this - sorry for the delay.
It is bad to embed type definitions with Nodejs: Even though they
_reflect_ the Nodejs ABI, they are maintained independently and is it
painful to need a recompile of Nodejs for a change of the type
definitions.
I suggest to embed it with a tiny popular general-purpose package - but
I am not sure which is more ideal. Seems to me that node-inherits or
node-safe-buffer are good candidates...
It is bad to embed type definitions with node-typescript: It adds
baggage to non-TypeScript consumers of the package.
I have now embedded @types/estree with node-eslint-visitor-keys - a tiny
package related to AST parsing, with only few dependencies. Please do
shout if anyone thinks it is better to embed it somewhere else.
- Jonas
--
* Jonas Smedegaard - idealist & Internet-arkitekt
* Tlf.: +45 40843136 Website: http://dr.jones.dk/
[x] quote me freely [ ] ask before reusing [ ] keep private
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: signature
URL: <http://alioth-lists.debian.net/pipermail/pkg-javascript-devel/attachments/20210102/6325cd29/attachment.sig>
More information about the Pkg-javascript-devel
mailing list