Skip to content

Commit

Permalink
build(typescript): test coverage for typescript/lib/tsserverlibrary.d.ts
Browse files Browse the repository at this point in the history
Verify that typescript/lib/typescript.d.ts and typescript/lib/tsserverlibrary.d.ts are available since we must exclude all other typescript/lib/*.d.ts which are controlled by the compilerOptions.libs config.
See #875 for more details.
  • Loading branch information
gregmagolan committed Jun 19, 2019
1 parent 43933ce commit 8aed890
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion e2e/ts_library/foobar/bar.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,16 @@ import {a} from 'e2e_ts_library/generated_ts/foo';
// Repro for #31, should automatically discover @types/node
import * as fs from 'fs';
import {cool} from 'some-lib';
// Verify that typescript/lib/typescript.d.ts and typescript/lib/tsserverlibrary.d.ts
// are available since we must exclude all other typescript/lib/*.d.ts which are
// controlled by the compilerOptions.libs config.
// See https://github.com/bazelbuild/rules_nodejs/pull/875 for more details.
import * as ts from 'typescript';
import * as tss from 'typescript/lib/tsserverlibrary';

import('./foo').then(({greeter}) => {console.log(Greeter, fs, cool, ts, greeter, a);});
import('./foo').then(({greeter}) => {console.log(Greeter, fs, cool, ts, greeter, a);});

const useTssType: tss.server.Project[] = [];
if (useTssType) {
console.log('foobar');
}

0 comments on commit 8aed890

Please sign in to comment.