-
-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
feat: Add TypeScript support #9550
base: alpha
Are you sure you want to change the base?
Conversation
Thanks for opening this pull request! |
722576b
to
c098c1b
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## alpha #9550 +/- ##
==========================================
- Coverage 93.51% 93.50% -0.02%
==========================================
Files 186 186
Lines 14807 14802 -5
==========================================
- Hits 13847 13840 -7
- Misses 960 962 +2 ☔ View full report in Codecov by Sentry. |
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.
Great! Could you please also convert a file (or parts of it?) to TS, as an example, to see whether the gradual conversion works?
["@babel/preset-env", { | ||
"targets": { | ||
"node": "14" | ||
"node": "18" |
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.
Is this a breaking change?
"lint-fix": "eslint --fix --cache ./", | ||
"build": "babel src/ -d lib/ --copy-files", | ||
"build": "babel src/ -d lib/ --copy-files --extensions '.ts,.js'", | ||
"build:types": "tsc && prettier --write 'types/{**/*,*}.ts' && npm run lint-fix", |
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.
Why does building types require prettier and lint-fix?
"lint-fix": "eslint --fix --cache ./", | ||
"build": "babel src/ -d lib/ --copy-files", | ||
"build": "babel src/ -d lib/ --copy-files --extensions '.ts,.js'", | ||
"build:types": "tsc && prettier --write 'types/{**/*,*}.ts' && npm run lint-fix", |
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.
Could you please add a test:types
script and a CI job for it, like we have in the JS SDK? I think you can just copy both from https://github.com/parse-community/Parse-SDK-JS/pull/1985/files
Pull Request
Issue
Closes: #7334
Approach
Note: The "options" and docs files that are generated are not currently compatible, as the babel plugin will need to be updated to support the new TS format.
Tasks