Crate utility_types[][src]

Expand description

utility_types

This crate use proc-macro to realize several utility types of TypeScript

macroTypeScript Utility Type
partialPartial<Type>
requiredRequired<Type>
pickPick<Type, Keys>
omitOmit<Type, Keys>
excludeExclude<Type, ExcludedUnion>
extractExtract<Type, Union>

Attribute Macros

Constructs an enum by excluding variants in the set from the original enum.

Constructs an enum by extracting variants in the set from the original enum.

Constructs a struct by picking fields which not in the set from the original struct.

Constructs a struct with all properties of the original struct set to optional.

Constructs a struct by picking the set of fields from the original struct.

Constructs a struct consisting of all properties of the original struct set to required. The opposite of partial.