-
Notifications
You must be signed in to change notification settings - Fork 31
Conversation
de2e418
to
4a7231c
Compare
Well, huh, this error doesn't read as well as Flow's. It gets the point across, though.
|
4a7231c
to
d92786c
Compare
I rebased this branch to fix the conflicts. |
Today I learnt that TS apparently distinguishes public and internal props automatically. I am not sure if that is 100% correct/true or even reliable, but that looks very promising! Also, the TS core team is more and more focused on developer experience so I expect better compiler messages in the near future. |
I can't get a typescript error in a test file to show up anywhere. Can you? diff --git a/src/App.test.tsx b/src/App.test.tsx
index a754b20..3a04aad 100644
--- a/src/App.test.tsx
+++ b/src/App.test.tsx
@@ -4,6 +4,6 @@ import App from './App';
it('renders without crashing', () => {
const div = document.createElement('div');
- ReactDOM.render(<App />, div);
+ ReactDOM.render(<App foo="wrong" />, div);
ReactDOM.unmountComponentAtNode(div);
}); We definitely want to see type errors in test files. |
Yep, I have that in my |
Can you share your vim config for that? We need to, at the very least, make the build fail when there is a type error in a test file. If it's hard, we could defer it to a future issue. |
let me push that
Yep, this PR brings basic TS support. Let me open an issue to fail the build on TS errors, just like we have for Flow. ===> #33 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks like a good start
I have some ideas for #33 so I'll merge this to get started on it. |
Fixes #23
This PR adds TypeScript as recommended by the CRA documentation.
I also fixed the file permissions because CRA did not set the right permissions when the project has been created.