-
Notifications
You must be signed in to change notification settings - Fork 453
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: only do type checking while compiling file (#1483)
- Loading branch information
Showing
37 changed files
with
1,861 additions
and
885 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1 @@ | ||
export function strInNumOut(input: string): number { | ||
return input | ||
} | ||
export type Thing = { a: number, b: number } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export type Thing = { a: number, b: number } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.