Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Does not show jsdoc documentation from import - JavaScript ES module #132649

Closed
patoi opened this issue Sep 8, 2021 · 4 comments
Closed

Does not show jsdoc documentation from import - JavaScript ES module #132649

patoi opened this issue Sep 8, 2021 · 4 comments
Assignees
Labels
info-needed Issue requires more information from poster javascript JavaScript support issues

Comments

@patoi
Copy link

patoi commented Sep 8, 2021

Issue Type: Bug

Given the next module (./utils/setup.mjs file):

/** @module utils/setup */
import { firefox } from 'playwright-firefox'

/**
 * Playwright page object.
 * @type {import('@playwright/test').Page}
 */
export let page

And other js file, with import (./utils/setup.mjs):

import { strict as assert } from 'assert'
import { page} from './utils/setup.mjs'

describe.only('smoke test', () => {
  it('test', async function () {
    await page.goto('https://lwhateveruwant.com')
   ...
  })
})

Actual: When I pressed CMD + space over goto function, the documentation is "No suggestion."

image

Expected: show Playwright Page goto function documentation, for example:

image

jsconfig.json:

{
  "compilerOptions": {
    "module": "esnext",
    "target": "es6",
    "checkJs": true,
    "allowSyntheticDefaultImports": false
  },
  "exclude": [
    "node_modules",
    "target"
  ],
  "include": [
    "src/test/uat/**/*.mjs"
  ]
}

VS Code version: Code 1.60.0 (e7d7e9a, 2021-09-01T10:54:53.442Z)
OS version: Darwin x64 20.6.0
Restricted Mode: No

System Info
Item Value
CPUs Intel(R) Core(TM) i7-7700HQ CPU @ 2.80GHz (8 x 2800)
GPU Status 2d_canvas: enabled
gpu_compositing: enabled
metal: disabled_off
multiple_raster_threads: enabled_on
oop_rasterization: enabled
opengl: enabled_on
rasterization: enabled
skia_renderer: disabled_off_ok
video_decode: enabled
webgl: enabled
webgl2: enabled
Load (avg) 3, 4, 3
Memory (System) 16.00GB (1.49GB free)
Process Argv
Screen Reader no
VM 0%
Extensions (34)
Extension Author (truncated) Version
asciidoctor-vscode asc 2.8.9
better-toml bun 0.3.2
vscode-standardjs che 1.4.1
npm-intellisense chr 1.4.0
path-intellisense chr 2.4.0
vscode-eslint dba 2.1.23
FreeMarker dco 0.0.9
xml Dot 2.5.1
gitlens eam 11.6.0
vscode-npm-script eg2 0.3.22
vsc-material-theme Equ 33.2.0
vsc-material-theme-icons equ 1.2.2
carbon-now-sh eri 1.2.0
prettier-vscode esb 8.1.0
vscode-google-translate fun 1.4.13
todo-tree Gru 0.0.214
jenkinsfile-support ivo 1.1.0
search-node-modules jas 1.3.0
JavaScriptSnippetsStandard jms 1.8.0
asciidoctor-vscode joa 2.8.0
presentationmode jsp 1.1.5
vscode-commitizen Kni 1.0.1
dotenv mik 1.0.1
vscode-docker ms- 1.16.1
vscode-language-pack-hu MS- 1.48.3
remote-containers ms- 0.194.0
vscode-typescript-tslint-plugin ms- 1.3.3
vetur oct 0.34.1
vscode-xml red 0.18.0
vscode-yaml red 0.22.0
svelte-vscode sve 105.3.5
nodejs-extension-pack wad 0.1.9
JavaScriptSnippets xab 1.8.0
material-theme zhu 3.11.4

(4 theme extensions excluded)

@ghost
Copy link

ghost commented Sep 8, 2021

For me its always like that no matter the case. I think it's intended.

Edit: Is shows intellisense suggestions where possible. This means it is intended.

@mjbvz
Copy link
Collaborator

mjbvz commented Sep 9, 2021

Does it work if you use .js files instead of .mjs? See microsoft/TypeScript#27957

@mjbvz mjbvz added javascript JavaScript support issues info-needed Issue requires more information from poster labels Sep 9, 2021
@patoi
Copy link
Author

patoi commented Sep 10, 2021

If I renamed to .js, then it works fine, thank you!

@patoi
Copy link
Author

patoi commented Sep 10, 2021

Thanks for investigation!

@patoi patoi closed this as completed Sep 10, 2021
@github-actions github-actions bot locked and limited conversation to collaborators Oct 25, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
info-needed Issue requires more information from poster javascript JavaScript support issues
Projects
None yet
Development

No branches or pull requests

2 participants