Skip to content

Commit

Permalink
Enable TypeScript declaration maps (#528)
Browse files Browse the repository at this point in the history
Declaration maps are a neat feature that landed in TS 2.9, enabling it
emits a sourcemap for declaration files (.d.ts.map). Like JS .map files
they are for resolving to the original source of declaration files, but
instead of being used by the browser they are used by the user's text
editor/ide.

Basically, where before in vscode if you go to defintion on `html` in
`import {html} from 'lit-html'` you would end up in the declaration
file, now it will take you to the correct position in the original .ts file.
  • Loading branch information
Alexendoo authored and justinfagnani committed Oct 5, 2018
1 parent 445d756 commit 663127f
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Expand Up @@ -7,9 +7,11 @@

# Compiler output
/lit-html.d.ts
/lit-html.d.ts.map
/lit-html.js
/lit-html.js.map
/test/**/*.d.ts
/test/**/*.d.ts.map
/test/**/*.js
/test/**/*.js.map

Expand Down
1 change: 1 addition & 0 deletions package.json
Expand Up @@ -13,6 +13,7 @@
"/lit-html.js",
"/lit-html.js.map",
"/lit-html.d.ts",
"/lit-html.d.ts.map",
"/lib/",
"/directives/",
"/src/",
Expand Down
1 change: 1 addition & 0 deletions tsconfig.json
Expand Up @@ -4,6 +4,7 @@
"module": "es2015",
"lib": ["es2017", "esnext.asynciterable", "dom"],
"declaration": true,
"declarationMap": true,
"sourceMap": true,
"inlineSources": true,
"outDir": "./",
Expand Down

0 comments on commit 663127f

Please sign in to comment.