This package has been deprecated

Author message:

Please use https://www.npmjs.com/package/ts-lit-plugin instead

ts-html-plugin

0.0.23 • Public • Published

Typescript HTML Plugin

Typescript plugin that adds type checking and code completion for html inside tagged template strings like lit-html.

Downloads per month Dependencies NPM Version Contributors MIT License

Features

  • Attribute type checking.
  • Report missing imports of custom elements.
  • Goto definition for tags and attributes.
  • Code completions for html tags and attributes.
  • Quick info on on hover for tags and attributes.
  • Required attributes not included
  • Auto closing tags.

Install

Visual Studio Code

If you use Visual Studio Code you can simply install the tagged-html extension.

code --install-extension runem.tagged-html

Other

First, install the plugin:

npm install ts-html-plugin -D

Then add a plugins section to your tsconfig.json:

{
  "compilerOptions": {
    "plugins": [
      {
        "name": "ts-html-plugin",
        "flavor": "lit-html"
      }
    ]
  }
}

Roadmap

  • Support for web-components.json
  • Add tests
  • Aria/accessibility mode
  • SVG support
  • CSS support
  • Support "// @ts-ignore"
  • Type check events (onclick, @click, eg.)
  • Type check slots
  • lit-html: Directive type checking support.
  • lit-element: Better support for the @property({}) decorator taking metadata into account.
  • vanilla: Parse custom elements (observedAttributes, eg.)

Package Sidebar

Install

npm i ts-html-plugin

Weekly Downloads

2

Version

0.0.23

License

MIT

Unpacked Size

224 kB

Total Files

62

Last publish

Collaborators

  • runebm