Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
ts-essentials@10
as dev dependencyValueOf
,Merge
,MarkOptional
andMarkRequired
NonOptional
as it's not usedForwardRef
(which helped removeSignatureType
andCallableType
) - inferred type is the same for my VSCodePotential benefits
Hey @dwelle and @ad1992!
I'm the maintainer of ts-essentials right now.
I've seen you're already using ts-essentials types
ValueOf
,Merge
,MarkOptional
andMarkRequired
so I thought it's worth checking if you'd like to include ts-essentials as a dev dependency.The benefits that you're getting from the library are:
ValueOf
tests - https://github.com/ts-essentials/ts-essentials/blob/master/test/value-of.tsMerge
tests - https://github.com/ts-essentials/ts-essentials/blob/master/test/merge.tsMarkOptional
tests - https://github.com/ts-essentials/ts-essentials/blob/master/test/mark-optional.tsMarkRequired
tests - https://github.com/ts-essentials/ts-essentials/blob/master/test/mark-required.tspackages/excalidraw/utility-types.ts
as far as I understand):Mutable
can be replaced withWritable
NestedKeyOf
can be replaced withPaths
MaybePromise
can be replaced withAsyncOrSync
ExtractSetType
can be potentially replaced withElementOf
(I can create an issue to extendElementOf
for sets and make it available as a patch release 10.0.1)Assert
andSameType
(usually calledIsExact
) can be introduced as a minor release 10.1.0MakeBrand
looks similar toOpaque
but I need to understand how you use it (Intellisense is mentioned in the comment, I need to confirm it with you)MarkNonNullable
can be added, similarly to other mark types, e.g.MarkRequired
I will leave it up to you, hope it's helpful!