Announcement

Collapse
No announcement yet.

[CLOSED] [#2464] JSDoc issue

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • [CLOSED] [#2464] JSDoc issue

    Hi guys!
    Class fields (or properties attributed with FieldProperty) are generated with wrong JSDoc header.
    Let's say we have a field named "caption". Here how Bridge.NET will generate the header:
             /**
             * @instance
             * @public
             * @this ru.mycompany.SomeClass
             * @memberof ru.mycompany.SomeClass
             * @function caption
             * @return  {string}
             */
             /**
             * @instance
             * @public
             * @this ru.mycompany.SomeClass
             * @memberof ru.mycompany.SomeClass
             * @function caption
             * @param   {string}    value
             * @return  {void}
             */
            caption: null,
    As a result, the field will be retrieved as 2 different methods, when JSDoc is generated (screen shot is here).

    What must be instead, to look correct:
            /**
             * @instance
             * @public
             * @this ru.mycompany.SomeClass
             * @memberof ru.mycompany.SomeClass
             * @name url
             * @type  {string}
             */
              caption: null,
    So that it looks correct (screen shot is here)
    Last edited by rumc; 2017-03-17 @ 03:02 PM.

  • #2
    Hi

    It is fixed in the following pull request (already in master)
    https://github.com/bridgedotnet/Bridge/pull/2464

    Comment


    • #3
      As well, the [FieldProperty] attribute is no longer required as of Bridge 16.0. Please see Issue #1229.

      All C# properties are now correctly emitted as proper JavaScript properties with real setter and getter configured.

      Given the following C#, the before and after 16.0 release JavaScript is outlined below.

      Example (C#)

      public class Program
      {
          public static void Main()
          {
              var person = new Person();
      
              person.Name = "Frank";
          }
      }
      
      public class Person
      {
          public string Name { get; set; }
      }
      Example (JavaScript)

      // Before 16.0
      var person = new Person();
      person.setName("Frank");
      
      // After 16.0
      var person = new Person();
      person.Name = "Frank";
      The JsDoc comment is also only generated once per property now as well.

      Comment


      • #4
        That's awsome!
        Where can I subscribe in order to get the news on new version release? Or may be there is a fixed date of release 16.0 ?

        Comment


        • #5
          Hi rumc – Everything is being tracked in the Bridge GitHub project. At the moment, there is no firm release date for 16.0. Once all issues with the 16.0 milestone are closed, we will release a Beta.

          Comment

          Working...
          X