Skip to content

[WIP] test: add dtslint, and add typings test file #1545

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

Closed

Conversation

ChristianMurphy
Copy link
Contributor

@ChristianMurphy ChristianMurphy commented Sep 26, 2019

⚠️ work in progress ⚠️

This

  • adds dtslint, a tool to test typescript definitions.
  • documents minimum typescript version needed to use typings
  • adds a typings tests file based off the simple example.
  • adds doc comments based off API docs
  • tests typings on Travis CI
  • updates Travis CI to test on Node 10 and 12 LTS versions

TODO

  • fix typings to support simple example
  • resolve dtslint errors

@codesandbox-ci
Copy link

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit a5b4826:

Sandbox Source
serene-cray-h8f5i Configuration

@stramel
Copy link
Contributor

stramel commented Sep 26, 2019

Check #1535 for updated types.

I think adding the testing around it would be great once we get that merged which will put us significantly closer to the actual API definition.

As for docs in the file, I don't see a benefit to maintaining/synchronizing the docs between the API.md file and the index.d.ts. I was actually looking for a way to generate the API docs automatically based on JSDocs using index.d.ts file. I think that would be preferred.

@ChristianMurphy
Copy link
Contributor Author

I think adding the testing around it would be great

Agreed

once we get that merged which will put us significantly closer to the actual API definition.

I trust that progress is being made, having tests can be a nice approach to measuring progress and ensuring no regressions crop up.

As for docs in the file, I don't see a benefit to maintaining/synchronizing the docs between the API.md file and the index.d.ts. I was actually looking for a way to generate the API docs automatically based on JSDocs using index.d.ts file. I think that would be preferred.

That's the same idea I'm working toward.
Moving the docs into the typescript definition.
Then having one of:

convert it into markdown, html, or any other format desired.

@ChristianMurphy ChristianMurphy mentioned this pull request Sep 30, 2019
@ChristianMurphy ChristianMurphy deleted the typings/dtslint branch September 30, 2019 21:12
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