这是indexloc提供的服务,不要输入任何密码
Skip to content

T.Writable is not exported #11 #12

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

Merged
merged 1 commit into from
Jun 29, 2019
Merged

T.Writable is not exported #11 #12

merged 1 commit into from
Jun 29, 2019

Conversation

regevbr
Copy link
Contributor

@regevbr regevbr commented Jun 29, 2019

🎁 Pull Request

  • Used a clear / meaningful title for this pull request
  • Tested the changes in your own code (on your projects)
  • Added / Edited tests to reflect changes (tst folder)
  • Have read the Contributing part of the Readme
  • Passed npm test

Fixes

Fix T.Writable is not exported #11

Why have you made changes?

To fix #11

What changes have you made?

  • Added missing exports to the Tuple/_api.d.ts file.
  • Added tests to T.Writable
  • Added support for T.Writable to accept readonly arrays

What tests have you updated?

  • tested this in tst/Tuple.ts

Is there any breaking changes?

  • Yes, I changed the public API & documented it
  • Yes, I changed existing tests
  • No, I added to the public API & documented it
  • No, I added to the existing tests
  • I don't know

@regevbr
Copy link
Contributor Author

regevbr commented Jun 29, 2019

@pirix-gh I hope this PR will suite your standards

@millsp
Copy link
Owner

millsp commented Jun 29, 2019

I'm investigating your PR to see if this could be applied to all the types

@millsp millsp merged commit 891e84e into millsp:master Jun 29, 2019
@millsp
Copy link
Owner

millsp commented Jun 29, 2019

TypeDoc is giving me problems generating the docs when using readonly... They don't support it

@millsp
Copy link
Owner

millsp commented Jun 29, 2019

Seems like I'll have to add ReadonlyArray to bypass that. For now, till I write a proper doc generator.

@millsp
Copy link
Owner

millsp commented Jun 29, 2019

Ok, it's not possible to generalize it like I said. But it's now fixed with your changes. Thanks!

(v2.1.5)

@regevbr
Copy link
Contributor Author

regevbr commented Jun 29, 2019

Always happy to help!

@regevbr
Copy link
Contributor Author

regevbr commented Jun 29, 2019

Feel free to assign me future issues

@millsp
Copy link
Owner

millsp commented Jun 29, 2019

There's going to be a 3.x update with a few breaking changes. Those will improve type soundness and provide computations that have minimum impact on the global performance. It's a sacrifice that is needed.
The changes concern the Boolean mostly (API change), but will also change (Internally only) a few other types.

@regevbr
Copy link
Contributor Author

regevbr commented Jun 29, 2019

When can we expect that version? I will defer my work until then as I use this library extensively now

@millsp
Copy link
Owner

millsp commented Jun 29, 2019

I don't know for sure. But I'm giving myself a deadline of 5-6 days from now, going to try to rush it though. I'll keep you updated. But as I said, Boolean API will change and only the types returning boolean will change too. The actual boolean is making the lib too heavy, and is being changed to 0 & 1 so that it can be used to build indexed conditional types (thus helping remove the slow extends on predicates).

It will also help to fix types that don't work well on unions, which is a bug. So it's a 2-in-1 update.

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.

T.Writable is not exported
2 participants