This package provides type definitions for LWC projects written in TypeScript.
[!IMPORTANT] If you use the
lwc
package in your project, then HTML and CSS imports will work without any configuration required.
To enable importing templates or stylesheets, simply import this package once, from anywhere in your project.
// ./types/global.d.ts
import '@lwc/types'
// my-component.ts
import stylesheet from './my-component.css'
import template from './my-component.html'
This package provides module definitions for HTML and CSS files, so that they can be imported in LWC component script files.