-
-
Notifications
You must be signed in to change notification settings - Fork 27k
Speed up TypeScript v2 #6406
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
Merged
Merged
Speed up TypeScript v2 #6406
Changes from 1 commit
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
9581519
Revert "Revert "Speed up TypeScript projects (#5903)""
ianschmitz 7ecde96
Move fork-ts-checker dep to react-dev-utils
ianschmitz 007e6fd
Convert WebpackDevServerUtils.createCompiler to take in options arg
ianschmitz 9c48ec6
Update README.md for react-dev-utils
ianschmitz File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 contains hidden or 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 contains hidden or 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 contains hidden or 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 contains hidden or 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 contains hidden or 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
Empty file.
This file contains hidden or 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,33 @@ | ||
const testSetup = require('../__shared__/test-setup'); | ||
const puppeteer = require('puppeteer'); | ||
|
||
const expectedErrorMsg = `Argument of type '123' is not assignable to parameter of type 'string'`; | ||
|
||
test('shows error overlay in browser', async () => { | ||
const { port, done } = await testSetup.scripts.start(); | ||
|
||
const browser = await puppeteer.launch({ headless: true }); | ||
try { | ||
const page = await browser.newPage(); | ||
await page.goto(`http://localhost:${port}/`); | ||
await page.waitForSelector('iframe', { timeout: 5000 }); | ||
const overlayMsg = await page.evaluate(() => { | ||
const overlay = document.querySelector('iframe').contentWindow; | ||
return overlay.document.body.innerHTML; | ||
}); | ||
expect(overlayMsg).toContain(expectedErrorMsg); | ||
} finally { | ||
browser.close(); | ||
done(); | ||
} | ||
}); | ||
|
||
test('shows error in console (dev mode)', async () => { | ||
const { stderr } = await testSetup.scripts.start({ smoke: true }); | ||
expect(stderr).toContain(expectedErrorMsg); | ||
}); | ||
|
||
test('shows error in console (prod mode)', async () => { | ||
const { stderr } = await testSetup.scripts.build(); | ||
expect(stderr).toContain(expectedErrorMsg); | ||
}); |
This file contains hidden or 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,9 @@ | ||
{ | ||
"dependencies": { | ||
"@types/react": "*", | ||
"@types/react-dom": "*", | ||
"react": "*", | ||
"react-dom": "*", | ||
"typescript": "3.1.3" | ||
} | ||
} |
This file contains hidden or 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,13 @@ | ||
import * as React from 'react'; | ||
|
||
class App extends React.Component { | ||
render() { | ||
return <div>{format(123)}</div>; | ||
} | ||
} | ||
|
||
function format(value: string) { | ||
return value; | ||
} | ||
|
||
export default App; |
This file contains hidden or 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,5 @@ | ||
import * as React from 'react'; | ||
import * as ReactDOM from 'react-dom'; | ||
import App from './App'; | ||
|
||
ReactDOM.render(<App />, document.getElementById('root')); |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.