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

Typescript Support #51

Closed
BlackFenix2 opened this issue Oct 11, 2019 · 3 comments
Closed

Typescript Support #51

BlackFenix2 opened this issue Oct 11, 2019 · 3 comments

Comments

@BlackFenix2
Copy link
Contributor

Just a discussion thread for my eventual PR to add typescript support for this app. i can start by adding type definitions and go further by writing everything in typescript vs javascript. this would remove the need for the prop-types peer dependency.

@BlackFenix2
Copy link
Contributor Author

BlackFenix2 commented Oct 12, 2019

i added my PR for Typescript here: #52

good thing you knew how to TDD (Test Driven Design), i broke your app a bunch trying to teach it typescript 😺

AaronCCWong pushed a commit that referenced this issue Nov 7, 2019
* added quote_type = single to .editorconfig for lint/preetier consistency

* prettier formatting, added react settings to eslintrc

* rewrote component with hooks

* added wrapper.update() method to catch prop updates on function component

* added typescript. build cmd works but webpack.e2e.js doesnt work

* added typescript

* fixed extensions option in webpack configs from 'tsx' to '.tsx'

* finished scaffolding typescript and jest. added jsdoc to ReactCardFlip.tsx properties.

* added build folders to .gitignore

* removed lib folder

* hotfix: throw an exception if the component does not have exactly 2 children.

* removed the key attribute requirement for ReactFlipCard children

* hotfix: forgot to include index.d.ts in package.json file array

* Update package.json

Accidentally added react and react-dom to dependencies, removing.

* replaced yarn scripts with npm, removed yarn.lock and trimmed jest.config.js

* modified index.d.ts

* Add unit test for vertical flipping and fix prop deconstruct

* Remove prop-types install from travis

* Update README to reflect removal of key

Closes #51
@jctan
Copy link

jctan commented Jan 1, 2021

would ReactCardFlip.tsx need to convert to ts for consistency?

@AaronCCWong
Copy link
Owner

ReactCardFlip.tsx is already TypeScript. Unless you mean the extension in which case I believe .tsx is the better extension as it makes clear that this file contains JSX.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants