appwrite/sdk-for-web

๐Ÿ› Bug Report: JSDocstrings for functions not appearing in VSCode Intellisense thingy when using Web SDK

RyanBaig opened this issue ยท 2 comments

๐Ÿ‘Ÿ Reproduction steps

  1. Open HTML file.
  2. Add Web SDK CDN.
  3. Initialize Appwrite Client using:
const client = new Appwrite.Client()
  1. Set Projects, Endpoint:
client.setProject("myProject");
client.setEndpoint("https://cloud.appwrite.io/v1")
  1. Hover over client.setProject("myProject"); or client.setEndpoint("https://cloud.appwrite.io/v1") and see no JSDocstring.

๐Ÿ‘ Expected behavior

When I hover over the client.setProject("myProject"); or client.setEndpoint("https://cloud.appwrite.io/v1") part, it should show the JSDoc using this Docstring provided in your source code:

/**
     * Set Endpoint
     *
     * Your project endpoint
     *
     * @param {string} endpoint
     *
     * @returns {this}
*/

or

/**
     * Set Project
     *
     * Your project ID
     *
     * @param value string
     *
     * @return {this}
*/

๐Ÿ‘Ž Actual Behavior

They actually don't. I am not sure if this is a problem by the IDE or not.

๐ŸŽฒ Appwrite version

Version 0.10.x

๐Ÿ’ป Operating system

Windows

๐Ÿงฑ Your Environment

Vercel for hosting. VSCode 1.70.3 as IDE, Windows 7 for OS, HP Probook 4520s for Machine

๐Ÿ‘€ Have you spent some time to check if this issue has been raised before?

  • I checked and didn't find similar issue

๐Ÿข Have you read the Code of Conduct?

@RyanBaig, thanks for raising this issue! ๐Ÿ™๐Ÿผ Does this work with any other package from CDN? Do you have a code sample of it working with another CDN? I tried with lodash and didn't get any typing info:

image

From my experience, your IDE knows about packages when you have a package.json and install the package so it's in your node_modules. When you add a script tag for a package, the IDE has no idea about the types and whatnot about the package.

Closing as stale.