-
-
Notifications
You must be signed in to change notification settings - Fork 227
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
Add new type: Mutable<T, K> (AugmentedMutable<T, K>),AugmentedReadonly<T, K>, and maybe AugmentedPartial<T, K> #112
Comments
Mutable<T, K>
(AugmentedMutable<T, K>
),AugmentedReadonly<T, K>
, and maybe AugmentedPartial<T, K>
Hey @dosentmatter, |
@piotrwitek, thanks for the response. Yeah, I understand that the AugmentedXXX are internal names. For example, Also, even for non-built-ins like So to summarize, shall we do the following:
I think I would do 1-4 and skip 5-7 since: |
1 - 4) 👍 The specification is ready, accepting contributions. |
@piotrwitek commented for `Optional` -> `Partial`, it doesn't cost anything to add an alias and a mention in docs. See: piotrwitek#112 (comment) Similarly, the same can be said for `Writable` -> `Mutable`. We already have `WritableKeys<T>` -> `MutableKeys<T>` alias.
* Fix `Brand` "back to top" anchor link `Brand` is not a Flow utility type. * Capitalize first letter of `@desc` * Remove trailing whitespace * Add back line break before flow URLs * Add `Writable<T>` alias to `Mutable<T>` @piotrwitek commented for `Optional` -> `Partial`, it doesn't cost anything to add an alias and a mention in docs. See: #112 (comment) Similarly, the same can be said for `Writable` -> `Mutable`. We already have `WritableKeys<T>` -> `MutableKeys<T>` alias. * Export `Writable<T>` alias from `src/index.ts`
Is your feature request related to a real problem or use-case?
Related to #27. I added
Mutable<T>
in #111.For optional properties, we have
Optional<T, K>
andRequired<T, K>
(AugmentedRequired<T, K>
in our codebase).To be consistent, we should also have
AugmentedMutable<T, K>
andAugmentedReadonly<T, K>
.Maybe we should even have
AugmentedPartial<T, K>
(althoughOptional<T, K>
already does the job) for consistency sake.We should have some consistency between
Partial
vsOptional
. These two keywords mean the same thing for us. However, in the case ofRequired
, we didn't use a new word and just augmented withAugmentedRequired<T, K>
.Describe a solution including usage in code example
Given
Mutable<T>
in #111:Who does this impact? Who is this for?
TypeScript users.
The text was updated successfully, but these errors were encountered: