Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: only do type checking while compiling file #1483

Merged
merged 7 commits into from Apr 2, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 0 additions & 6 deletions e2e/__cases__/compiler-host/main.spec.ts

This file was deleted.

1 change: 0 additions & 1 deletion e2e/__cases__/compiler-host/main.ts

This file was deleted.

14 changes: 10 additions & 4 deletions e2e/__cases__/diagnostics/main.spec.ts
@@ -1,5 +1,11 @@
import { strInNumOut } from './main'
import { Thing } from "./main";

it('should pass', () => {
expect(strInNumOut('1')).toBe('1')
})
export const thing: Thing = { a: 1 };

function doTheThing() {
return 1 + 2;
}

it("should do the thing", () => {
expect(doTheThing()).toEqual(3);
});
4 changes: 1 addition & 3 deletions e2e/__cases__/diagnostics/main.ts
@@ -1,3 +1 @@
export function strInNumOut(input: string): number {
return input
}
export type Thing = { a: number, b: number }
11 changes: 11 additions & 0 deletions e2e/__cases__/isolated-modules/main.spec.ts
@@ -0,0 +1,11 @@
import { Thing } from "./main";

// See the Thing definition. Changing the type definition should result in a compile failure here.
export const thing: Thing = { a: 1 };
function doTheThing() {
return 1 + 2;
}

it("should do the thing", () => {
expect(doTheThing()).toEqual(3);
});
1 change: 1 addition & 0 deletions e2e/__cases__/isolated-modules/main.ts
@@ -0,0 +1 @@
export type Thing = { a: number, b: number }
8 changes: 4 additions & 4 deletions e2e/__helpers__/templates.ts
Expand Up @@ -6,7 +6,7 @@ export enum PackageSets {
// invalid
unsupportedVersion = 'with-unsupported-version',
}
export const allValidPackageSets = [PackageSets.default, PackageSets.babel7, PackageSets.babel7StringConfig, PackageSets.typescript2_7],
allPackageSetsWithPreset = [PackageSets.default, PackageSets.babel7, PackageSets.babel7StringConfig, PackageSets.typescript2_7],
allPackageSetsWithProgram = [PackageSets.default, PackageSets.babel7, PackageSets.babel7StringConfig],
allPackageSetsWithoutProgram = [PackageSets.typescript2_7, PackageSets.unsupportedVersion]
export const allValidPackageSets = [PackageSets.default, PackageSets.babel7, PackageSets.babel7StringConfig, PackageSets.typescript2_7]
export const allPackageSetsWithPreset = [PackageSets.default, PackageSets.babel7, PackageSets.babel7StringConfig, PackageSets.typescript2_7]
export const allPackageSetsWithProgram = [PackageSets.default, PackageSets.babel7, PackageSets.babel7StringConfig]
export const allPackageSetsWithoutProgram = [PackageSets.typescript2_7, PackageSets.unsupportedVersion]
213 changes: 0 additions & 213 deletions e2e/__tests__/__snapshots__/compiler-host.test.ts.snap

This file was deleted.