Open mtrezza opened 1 year ago
@mtrezza just realized I can’t edit the OP (original post). I would like to put my name down to claim some files in case @danielbm @sadortun or other developers want to work on them to prevent conflicts
I'd say just post a comment with the sub-list you're working on and I'll update the main list from time to time.
Alright, once the PRs are merged, I'll go ahead and cross the items off the list. Other than that, as always, a contributor is encouraged to read the thread to know whether someone is already working an the issue - or parts of it.
I also suggest to open a PR early while work is in progress, which allows others to have insight into the progress. To prevent blocking issues, as long as there is no PR (or the PR is stale) we would always welcome and suggest to others to start working on it if they asked.
quick question, is this npm package setup to allow using the typescript definitions defined in the parse.ts file? I'd like to remove @types/parse as it's outdated, but removing it causes typescript compile issues now.
Could not find a declaration file for module 'parse/node'. '.../node_modules/parse/node.js' implicitly has an 'any' type.
Try npm i --save-dev @types/parse
if it exists or add a new declaration (.d.ts) file containing declare module 'parse/node';
ts(7016)
Thanks for your help.
Hello I am not really sure this is entirely related but I open sourced my solution for providing types for custom database classes. What do you think about the approach? https://www.npmjs.com/package/parse-sdk-ts
@theolundqvist Your comment seems more related to https://github.com/parse-community/Parse-SDK-JS/issues/1313. You may want to move it to there, if it is of use to the discussion there. If you are just asking for feedback about your project however, as it seems from your comment, you would do that in the community forum - GitHub issues are not the right place for that.
@mtrezza I've been trying to tackle this here https://github.com/swittk/Parse-SDK-JS/tree/typescript What do you think? If this seems OK I plan to finish more of it soon.
There are a few places where I'm not sure though,
static current()
is supposed to return current GeoPoint, but it seems like the return result is wrapped in a callbackthis.constructor
is used, and Typescript doesn't really like this pattern, so I had to cast any
at those places.CoreManager.ts
has a bunch of managers which appear to have either been defined with vague return values or incorrect function names, I've since corrected a few of them, but it's still not finished. Will look at the tests and DefaultManager implementation of each one to implement the correct types.@swittk could you please open a PR for review?
arrayContainsObject.js canBeSerialized.js decode.js encode.js equals.js escape.js isRevocableSession.js parseDate.js promiseUtils.js unique.js unsavedChildren.js uuid
CoreManager InstallationController Parse.js ParseGeoPoint ParseInstallation ParseObject ParseSession
ObjectStateMutation ParseFile ParseHooks ParseQuery ParseRole ParseUser Push.js TaskQueue
Cloud.js LiveQueryClient LocalDatastore LocalDatastoreController.default LocalDatastoreController.react-native LocalDatastoreUtils ParseCLP
FacebookUtils ParseConfig ParseOp ParsePolygon ParseSchema
Analytics AnonymousUtils CloudCode CryptoController EventEmitter LocalDatastoreController OfflineQuery RESTController Scoket.weapp.js Storage StorageController StorageController.browser StorageController.default StorageController.react-native StorageController.weapp WebSocketController Xhr.weapp
@danielbm @sadortun @swittk @tomwilsond1 @mtrezza
EventuallyQueue IndexDBStorageController LiveQuerySubscription ParseACL ParseError ParseLiveQuery ParseRelation SingleInstanceStateController UniqueInstanceStateController
All files have been converted to TypeScript. I'm not a TS developer and I don't have a TS project to test with.
Here are the next steps
"types": "./types/index.d.ts"
to package.json
any
everywhere)./types
to files
in package.json
?@parse-community/js-sdk Can this issue be closed?
This issue is half done. I left instructions in my last comment on the next steps to close it if anybody is interested.
New Feature / Enhancement Checklist
Current Limitation
TypeScript support has been added with https://github.com/parse-community/Parse-SDK-JS/issues/1950. The next step is to expand it to more files.
Feature / Enhancement Description
Contributing
.ts
./tsconfig.json
npm run build:types
types/test.ts
npm run test:types
Progress (1/62)