Skip to content

Calling ambiguous overloaded methods #466

@jszczypk

Description

@jszczypk

Hi,

In NET library that I am using, I have two overloaded methods: x(guid) and x(string).
When calling x('aaa') from JavaScript, marshaller can't decide which method to call which results in TypeError: Multiple overloads were found for the supplied argument types.

I have tried creating both System.String and System.Guid objects in JavaScript and passing it to x, however this results in TypeError: A string was expected: Error in GetValueStringUtf16 at D:\a\_work\1\s\src\NodeApi\JSValue.cs:521

Is there any other way to overcome this in pure JavaScript without resorting to creating some proxy method in C#?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions