Skip to content

[html] support 'import' in <script type=module> tags #29315

@vp2177

Description

@vp2177
  • VSCode Version: 1.38.1 (originally 1.13.1)
  • OS Version: any

Steps to Reproduce:

  1. Given the files:
    a.js:
/**
 * @param {number} param1
 * @param {string} param2
 */
export function a(param1, param2) {}

index.html:

<script type="module">
  import {a} from './a.js'

  a( )
</script>
  1. When typing a(, the type information is not picked up from the definition of a() in a.js.
  2. Same works from a JS file

Now that import is beginning to appear in browsers I think handling this would make sense

Metadata

Metadata

Assignees

Labels

feature-requestRequest for new features or functionalityjavascriptJavaScript support issues

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions