Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6771627
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T15:27:16+00:00 2026-05-26T15:27:16+00:00

Toolkit I’m trying to document my classes but i’m using a self var to

  • 0

Toolkit

I’m trying to document my classes but i’m using a “self” var to expose only the public methods.

jsDoc can find the class name, but can’t find the methods, fields, properties, etc…

this is 1 of my classes:

Anny suggestion how I should approach this?

(function(App){
  /** @class The ViewModel for the EventView */
  App.ViewModels.EventsViewModel = function(service) {

    var self = {};

    /** Observable array containing events */
    self.events = new ko.observableArray();

    /** Call the fetchEvents method on the service */
    self.refreshEvents = function(e){
        $('.refreshBtn').changeIcon('refreshing');
        service.fetchEvents();
    }
    /** subscribe on the service->currentEvents var
      * on change update the events in this viewmodel
      * set the refesh butting is set to refresh (instead of refreashing) */
    service.currentEvents.subscribe(
        function(newValue){
            self.events(newValue);
            $('.refreshBtn').changeIcon('refresh');
        }
    );
    /** function for a timespan string ex: "10:00 - 14:00"
      * Date inputs should be of ISO-8601 Date format  */
    self.toTimeString= function(/* String */ start,/* String */ end)/* String */
    {
        var out = "";
        try
        {
            out =(start!=null && end!=null)? Util.IsoDateParse(start).format("HH:MM") + " - " + Util.IsoDateParse(end).format("HH:MM") : ""
        }
        catch(err)
        {
            out ="Error during toTimeString.\n\n";
            out+="Error description: " + err + "\n\n";
        }
        return out;
    }

    /** Call the fetchEvents method on the service */
    self.refreshEvents();

    return self;
  };
})(App)

ps: I’m using Knockoutjs & jQueryMobile

EDIT:

Thanks! Almost there… I tried to do something like this:

/** @memberOf App.ViewModels.EventsViewModel#
  * @field * @description Observable array containing events */
self.events = new ko.observableArray();

jsDoc shows it like “self.events” instead of “events”

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T15:27:16+00:00Added an answer on May 26, 2026 at 3:27 pm

    Use the memberOf tag(TagMemberOf). And since App.ViewModels.EventsViewModel is declared in an anonymous function you may need to use the name tag(TagName) to scope it as global.

    Edit:

    Try:

    /** @memberOf App.ViewModels.EventsViewModel#
      * @field
      * @description Observable array containing events
      * @name events
      */
    self.events = new ko.observableArray();
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm using the Toolkit's Datepicker as above but I'd like to restrict it to
I'm using the toolkit:DataGrid from CodePlex. I'm generating the columns in code. How can
I am using jsdoc-toolkit with the namespace library of Mike Koss . The code
Using the Silverlight 4 toolkit chart control, I am trying to create a chart
In the Ajax toolkit you can use a Tab Container and add TabPanels to
I have a WPf Toolkit-datagrid..in my application which follows MVVM pattern. How I can
In the toolkit, I can't figure out how to change the color of the
I really like Template Toolkit and like how it works with Catalyst , but
Using the BizTalk ESB Toolkit 2.0 We are working on a project where we
I am using wpf toolkit's datagrid i want to marge a row for all

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.