[Pas2js] Question regarding the New() function (#34736)

Michael Van Canneyt michael at freepascal.org
Thu Dec 20 17:11:48 CET 2018



On Thu, 20 Dec 2018, Mattias Gaertner via Pas2js wrote:

>> Not in the near future. As I explained in my answer to your
>> bugreport: The function does checking of the argument types.
>
> Note: To avoid the array brackets and name conflicts, it could be
> defined like this:
> function new(Name:string; value:jsvalue): TJSObject; varargs; overload;

That seems like a good idea. At least notationally, it will be easy.

of course, it will not generate a literal object but still a function call.

Michael.


More information about the Pas2js mailing list