Profound Pro Tips is a blog series focused on issues that our support team receives and questions our Profound Logic customers have. Don't see your question/concern in Profound Pro Tips? Please feel free to contact our team or leave us a comment below.
Today’s Topic: How to access the Profound.js API via Intellisense with Visual Studio Code.
Keep reading to learn more....
Step one to utilizing Intellisense and to find all references to your APIs when writing in your Profound.js module, you must require the 'profoundjs' module in your script like in the example below:
After that, any time you reference the 'pjs' namespace VSCode will prompt you with a list of Profound.js methods available for you to use (See figure 2). VSCode will also show you their parameters and a short description of the API.
VSCode is especially helpful when working with the Profound.js SQL API's. The 'pjs.prepare()' API returns an object which has more functions and in an object-orientated world, you could compare the 'prepare' function to a constructor and the return object being a new class with methods.
When you reference the object (class), you will get a list of methods available from within that object. As you start to type the list of parameters, VSCode will tell you what the parameter type is and also give you a detailed description of that parameter type.
Hopefully this easy-to-use tool can help you when developing your code in Visual Studio Code.
*NOTE: To be able to use the Profound.js API through Intellisense with Visual Studio Code, you must have Version 6 of Profound UI downloaded. *
Click the link to get started with Visual Studio Code.
Learn how to Make Modern Applications That You Will Love With IBM i RPG and Node.js with Profound UI and Profound.js! Watch the replay of this webinar hosted by Alex Roytman and Liam Allan TODAY!