u-now / types-x

eXtend ServiceNow development with type definitions
MIT License
1 stars 3 forks source link

sending up for review #68

Closed emyrold closed 5 years ago

emyrold commented 5 years ago

Hi John,

Two questions:

RESTAPIRequestBody

  1. In the sn-js-lib example it shows a constructor() and I could not figure out where to put that.
  2. In the developer.servicenow.com API there was two examples at the top. When I put them in my d.ts file it does not seem to recognize my @example tag.

Thanks,

-e

johncaruso commented 5 years ago

Answers:

  1. There is no constructor for this - that is what the API means when it says: "Note: You cannot instantiate objects of this type." The sn-js-lib code generally uses classes. For this case, an interface is more appropriate. We can discuss in more detail next meeting if you're still unclear on the difference between classes and interfaces.

  2. You were missing '*' on some lines of the JSDoc. There cannot be empty lines in the middle of a JSDoc comment. Once I added the '*'s for the blank lines, the example code lit up.

emyrold commented 5 years ago

ok, let me look... thanks!