Skip to content

Update README (add ref to tslink)#285

Merged
sehz merged 4 commits into
infinyon:masterfrom
DmitryAstafyev:master
Nov 22, 2023
Merged

Update README (add ref to tslink)#285
sehz merged 4 commits into
infinyon:masterfrom
DmitryAstafyev:master

Conversation

@DmitryAstafyev

Copy link
Copy Markdown
Contributor

Hello, guys.

I have one suggestion for you and I'm doing it via PR ;)

Since I've been using node-bindgen for a long time already across a couple of projects I found missing TypeScript types a little annoying ).

That's just not comfortable from a testing and developing perspective.

You know, some small changes in data type on the native module side, and you shouldn't forget to update it on nodejs side too.

With TypeScript it is much easier. Imagine workflow:

  1. generate a native node module
  2. generate TypeScript types based on previous
  3. include into the end-project as a full-fledged npm package
  4. build (with TypeScript compiler) an end-project.

You see? If some changes happen on step 1, on the heights level (nodejs) TypeScript compiler will inform about any errors. It makes a solution more stable and helps with testing indeed.

I've developed crate tslink which generates *.d.ts, *.js and *.ts files and actually creates a full-fledged npm package.

As a bonus - code highlights on the IDE level as well.

What do you think about it?
If you are finding this useful for your users, let's add some remarks about it to your documentation.

P.S.
Combined usage tslink and node-bindgen is very much covered by tests, you can see it in repo of the project.

@DmitryAstafyev

Copy link
Copy Markdown
Contributor Author

Hello @sehz , would be nice to see your opinion about this PR and its subject

@DmitryAstafyev

Copy link
Copy Markdown
Contributor Author

you can try with example of combined usage node-bindgen and tslink, just do next:

git clone https://github.com/DmitryAstafyev/tslink.git
cd tslink/examples/node_bindgen
sh ./run_test.sh

@sehz

sehz commented Nov 22, 2023

Copy link
Copy Markdown

@morenol WDYT?

@DmitryAstafyev

Copy link
Copy Markdown
Contributor Author

@sehz @morenol I've extended a little an example in the suggested documentation change and added a responsibility note, which indeed should be included. @morenol waiting for your feedback ;)

@morenol morenol left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sounds good to me

Comment thread README.md Outdated

@sehz sehz left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

Nice addition!

@sehz sehz added documentation Improvements or additions to documentation typescript labels Nov 22, 2023
@sehz sehz added this pull request to the merge queue Nov 22, 2023
Merged via the queue into infinyon:master with commit e92cfe7 Nov 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation typescript

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants