-
Notifications
You must be signed in to change notification settings - Fork 44
[Breaking Changes] Rewrite typings to be publishable to DefinitelyTyped #120
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
base: master
Are you sure you want to change the base?
Conversation
* Unfortunately, the compiler takes these out, so we'll have to consolidate everything into one big `index.d.ts` in the next commit.
This should be finished and ready for review. I'm still not sure how the tests on DT work, and I only got time to include tests for the Game objects. |
I'm not sure how tests work either. When I have time, I will see what I can figure out. |
@thaelina Seems like all the tests are basic JS routines and what the tests do is find out if no type errors exist. Here's React's tests as a reference: https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/types/react/test/index.ts |
Okay, I figured out how to do the tests and added some basic tests. Note that this still doesn't cover every single API in the docs, but this is still ready to merge. |
Reference: #21
Note that this does not close that issue just yet, but this is one small step to finally get the type declarations publishable onto DefinitelyTyped. Once this PR is approved and merged I'll open a PR on DefinitelyTyped to make sure everything's installable via
npm install @types/screeps-typescript-declarations
.index.d.ts
file.screeps-tests.ts
).