rust/editors/code
bors[bot] 856e4ba126
Merge #2979
2979: vscode: now we are actually using tslib r=matklad a=Veetaha

We had an incorrect setup where `tslib` was in `devDependencies`.
FYI:
tslib is a runtime dependency, it contains functions that are used by transpiled JavaScript in order not to inline them in each file.
For example:
```ts
// foo.ts (source code)
import * as foo from "foo";
// ---------------------------
// foo.js (compiled output)
"use strict";
var __importStar = (this && this.__importStar) || function (mod) {
    if (mod && mod.__esModule) return mod;
    var result = {};
    if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];
    result["default"] = mod;
    return result;
};
Object.defineProperty(exports, "__esModule", { value: true });
const foo = __importStar(require("foo"));
```
As you see, `tsc` generated that `__importStar` helper function in compiled output. And it generates it per each file if you don't enable `"importHelpers": true`. Now with `importHelpers` enabled we get the following picture:
```ts
// foo.ts (source code)
import * as foo from "foo";
// ---------------------------
// foo.js (compiled output)
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const tslib_1 = require("tslib");
const foo = tslib_1.__importStar(require("foo"));
```
It saves some bundle size, but I am not entirely sure wheter we want that. Discussions are welcome!

Co-authored-by: Veetaha <gerzoh1@gmail.com>
2020-02-02 14:05:23 +00:00
..
src Merge #2964 2020-02-01 15:41:55 +00:00
.gitignore add rollup bundler for vscode extension 2019-09-23 23:25:16 +02:00
.vscodeignore Rename VS Code extension to rust-analyzer 2020-01-13 11:13:18 +01:00
icon.png Extension icon 2020-01-15 16:07:39 +01:00
package-lock.json vscode: moved tslib to runtime dependencies and added \"importHelpers\": true 2020-02-01 23:11:39 +02:00
package.json Merge #2979 2020-02-02 14:05:23 +00:00
rollup.config.js Use types from vscode-langaugeclient 2020-01-15 12:04:35 +01:00
tsconfig.json vscode: moved tslib to runtime dependencies and added \"importHelpers\": true 2020-02-01 23:11:39 +02:00
tslint.json Add semicolons 2019-12-31 18:55:34 +01:00