microsoft / typescript-lit-html-plugin

TypeScript server plugin that adds intellisense for lit-html template strings
MIT License
255 stars 21 forks source link

Doesn't work in Visual Studio 2017 15.9.6 with TypeScript SDK 3.1.2 installed #29

Closed groege closed 5 years ago

groege commented 5 years ago

Plugin doesn't work at all, much like #11

package.json

{
  "version": "1.0.0",
  "name": "asp.net",
  "private": true,
  "devDependencies": {
    "@types/kendo-ui": "2019.1.0",
    "del": "3.0.0",
    "gulp": "4.0.0",
    "webpack": "4.29.0",
    "webpack-cli": "3.2.1",
    "typescript": "3.3.0-rc",
    "ts-loader": "5.3.3",
    "typescript-lit-html-plugin": "0.9.0"
  },
  "scripts": {
    "build:webpack": "webpack"
  }
}

tsconfig.json

{
  "compilerOptions": {
    "module": "commonjs",
    "noImplicitAny": true,
    "noEmitOnError": true,
    "removeComments": true,
    "sourceMap": true,
    "target": "es5",
    "lib": [ "es2015", "es5", "dom" ],
    "plugins": [
      {
        "name": "typescript-lit-html-plugin",
        "tags": [
          "html",
          "template"
        ]
      }
    ]
  },
  "compileOnSave": true
}

the following says "(TS) Cannot find the name 'html'"

var  test = html'

';

var test2 = html`

`;

Any help is greatly appreciated, let me know if you need any other information.

groege commented 5 years ago

Ok I'm getting it to work import { html } from 'lit-html'; was missing, while i get an error stating lit-html cannot be found, it seems to work.