nodejs / nodejs/node-gyp

Is there any way to remove type checking for the paramters

Open
#2,668 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
10.7k
Forks
1.9k
Avg merge
1d 4h
Merged PRs (30d)
5

Description

When compiling with no flags (Just "node-gyp build") it type checks the parameters. For example, putting in a string as a parameter returns an Error like

addon.New("String");
      ^

TypeError: A number was expected

How do I remove this functionality? I'm making a wrapper for a native library and I don't need the extra type checking.

Node Version: v18.1.0 and 8.5.5
Platform: Arch Linux
Compiler: 12.1.0 (GCC)

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the reported node-gyp build invocation and the native addon's addon.New call. No repository file or test is identified in the issue, so first determine whether the parameter checking comes from node-gyp or the native addon binding layer. Done should clarify whether the behavior can be disabled and provide a supported configuration or explain why it cannot.

Written by the indexing model from the issue text.

Assessment

Tech stack
node.js
Domain
build-system
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.