Skip to content

Add public IsCallable() and IsConstructor() extension methods#2371

Merged
lahma merged 1 commit into
sebastienros:mainfrom
lahma:public-iscallable-api
Mar 26, 2026
Merged

Add public IsCallable() and IsConstructor() extension methods#2371
lahma merged 1 commit into
sebastienros:mainfrom
lahma:public-iscallable-api

Conversation

@lahma

@lahma lahma commented Mar 26, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Adds IsCallable() and IsConstructor() public extension methods on JsValue, closing the gap in the public type-checking API (Can't check if a JsValue is a function #2338)
  • Follows the same pattern as existing IsArray(), IsDate(), IsPromise(), etc. extension methods
  • Delegates to the existing internal IsCallable / IsConstructor properties — no internal changes needed

Test plan

  • Added 4 tests in PublicInterfaceTests covering positive and negative cases for both methods
  • All tests pass on both net10.0 and net472 target frameworks
  • CI passes

🤖 Generated with Claude Code

…ienros#2338)

Expose IsCallable and IsConstructor as public extension methods on
JsValue, completing the public type-checking API surface alongside
existing methods like IsArray, IsDate, IsPromise, etc.

Closes sebastienros#2338

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@lahma
lahma enabled auto-merge (squash) March 26, 2026 16:44
@lahma
lahma merged commit 0a402dd into sebastienros:main Mar 26, 2026
4 checks passed
@lahma
lahma deleted the public-iscallable-api branch March 26, 2026 16:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant