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

  • SEARCH
  • Home
  • 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 6858191
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T02:07:36+00:00 2026-05-27T02:07:36+00:00

How can I document an object property with the object properties expected? For instance,

  • 0

How can I document an object property with the object properties expected?
For instance, if the object was this:

var Object = {
    /**
     * 
     */
    point: null
}

and the point had this structure:

{
    x,
    y
}

Is there anyway to say that the point should have the x and y property?
Well, of course I can do it in the description, but I was looking for a better way to do it, like in the params that we can do like this:

/**
 * @param {Object} point
 * @param {Number} point.x
 * @param {Number} point.y
 */
  • 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-27T02:07:37+00:00Added an answer on May 27, 2026 at 2:07 am

    You could always make a Point class.

    function Point(x, y) {
        this.x = x;
        this.y = y;
    }
    

    Then

    var Object = {
        /**
         * new Point(x, y)
         * @param {Point} point a point class
         */
        point: null
    }
    

    Other wise I would do

    /*
     * @param {Object} point {x, y}
     */
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've had this confusion since long. There is an error called cannot read property
How can i get the size of an Document object? DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
I have a javascript object with several properties. The object also contains an instance
Any suggestion how I can document my Perl code? What do you use and
How can I document a member inline in .Net? Let me explain. Most tools
How can you document components of your code such as the following effectively when
Question: How can I document Ruby code using Doxygen? Disclaimer: I know ruby already
I can get window.document but how can I get document.window ? I need to
Javascript can manipulate the document the browser is displaying, so the following: <script> document.write(<table><tr><td>Hola</td><td>Adios</td></tr></table>);
How can I retrieve document from CouchDB based on its field, not by ID?

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.