@lwc/types
v8.12.2
Published
This package provides type definitions for LWC projects written in TypeScript.
Downloads
12,449
Readme
@lwc/types
This package provides type definitions for LWC projects written in TypeScript.
Usage
[!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';
Module Definitions
This package provides module definitions for HTML and CSS files, so that they can be imported in LWC component script files.