Skip to content

[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

Open
wants to merge 13 commits into
base: master
Choose a base branch
from

Conversation

resir014
Copy link
Member

@resir014 resir014 commented Aug 26, 2017

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.

  • Consolidated into one single index.d.ts file.
  • Write a simple tests file (screeps-tests.ts).
  • Other minor tweaks and improvements.

@resir014 resir014 changed the title [WIP] [Breaking Changes] Rewrite typings to be publishable to DefinitelyTyped [Breaking Changes] Rewrite typings to be publishable to DefinitelyTyped Oct 8, 2017
@resir014
Copy link
Member Author

resir014 commented Oct 8, 2017

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.

cc: @Dessix @thaelina @anisoptera

@thaelina
Copy link
Contributor

thaelina commented Oct 8, 2017

I'm not sure how tests work either. When I have time, I will see what I can figure out.

@resir014
Copy link
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

@resir014
Copy link
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.

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

Successfully merging this pull request may close these issues.

2 participants