[Breaking Changes] Rewrite typings to be publishable to DefinitelyTyped#120
Open
resir014 wants to merge 13 commits into
Open
[Breaking Changes] Rewrite typings to be publishable to DefinitelyTyped#120resir014 wants to merge 13 commits into
resir014 wants to merge 13 commits into
Conversation
* Unfortunately, the compiler takes these out, so we'll have to consolidate everything into one big `index.d.ts` in the next commit.
Member
Author
|
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. |
Contributor
|
I'm not sure how tests work either. When I have time, I will see what I can figure out. |
Member
Author
|
@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 |
Closed
Member
Author
|
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. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.tsfile.screeps-tests.ts).