Skip to content
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

Unifying TaskSet and Task under a single identifier #185

Closed
wants to merge 5 commits into from

Conversation

davidmrdavid
Copy link
Collaborator

@davidmrdavid davidmrdavid commented Apr 20, 2020

This PR is informed by a problem brought up in: #174

We currently export TaskSet and Task types, which are really internal types. What we want is for users to deal with a generic Task type that encompasses the union of those interfaces. We already have that, in TaskBase, but the name TaskBase suggests that users should look for something more specific, so it might be a good idea to change it.

So this PR renames Task to SingleTask, and hides it from JSDoc, meaning that it won't be exported for use in IntelliSense. We also hid TaskSet in a previous PR.

This PR then renames TaskBase to Task and keeps it for IntelliSense use.

This is obviously a breaking change, but we are only recently paying close attention to the IntelliSense usage so this slipped under our radar. I'm happy to discuss alternatives or workarounds, this is just here to open a discussion, unless folks feel comfortable merging.

An outstanding "problem" is that TaskSet and SingleTask are still exported in src/classes.ts so I believe users still have access to it even if we hide them in JSDocs. We should consider doing a sweep over those exports and removing unwanted declarations.

Thanks!

@davidmrdavid davidmrdavid changed the title Djusto/type obfuscation Unifying TaskSet and Task under a single identifier Apr 20, 2020
@davidmrdavid davidmrdavid changed the title Unifying TaskSet and Task under a single identifier Unifying TaskSet and Task under a single identifier, for end-users Apr 20, 2020
@davidmrdavid davidmrdavid changed the title Unifying TaskSet and Task under a single identifier, for end-users Unifying TaskSet and Task under a single identifier Apr 20, 2020
@aaronpowell
Copy link
Contributor

I'll put this on my list for post-Build to review.

@davidmrdavid
Copy link
Collaborator Author

Superceded by -#305

@davidmrdavid davidmrdavid deleted the djusto/type-obfuscation branch January 25, 2022 21:35
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