uni-types 1.6.0 → 1.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (4) hide show
  1. package/README.md +267 -1
  2. package/dist/index.d.cts +12853 -3906
  3. package/dist/index.d.mts +12853 -3906
  4. package/package.json +5 -5
package/README.md CHANGED
@@ -18,7 +18,7 @@ A comprehensive collection of type helpers for TypeScript development
18
18
 
19
19
  ## Features
20
20
 
21
- - 🎯 **600+ Type Utilities** - Comprehensive type helpers for every use case
21
+ - 🎯 **800+ Type Utilities** - Comprehensive type helpers for every use case
22
22
  - 🔒 **Type Safe** - Full TypeScript support with strict type checking
23
23
  - 📦 **Zero Dependencies** - Lightweight and tree-shakeable
24
24
  - 🚀 **TypeScript 5.x** - Built with the latest TypeScript features
@@ -882,6 +882,272 @@ type Result = If<true, 'success', 'error'> // 'success'
882
882
  | `PerformanceTrace<T>` | Performance trace |
883
883
  | `PerformanceAlert` | Performance alert |
884
884
 
885
+ ### Metaprogramming *(v1.7.0)*
886
+
887
+ | Type | Description |
888
+ |------|-------------|
889
+ | `MetaType<T>` | Meta type wrapper |
890
+ | `TypeRepr<T>` | Type representation |
891
+ | `GetType<T>` | Extract type from meta |
892
+ | `HasType<T, U>` | Check if type has nested type |
893
+ | `TypePath<T>` | Path to nested type |
894
+ | `TypeDepth<T>` | Maximum nesting depth |
895
+ | `TypeSize<T>` | Type size estimation |
896
+ | `TypeComplexity<T>` | Type complexity score |
897
+ | `AnalyzeType<T>` | Full type analysis |
898
+ | `TypeStats<T>` | Type statistics |
899
+
900
+ ### Decorator Types *(v1.7.0)*
901
+
902
+ | Type | Description |
903
+ |------|-------------|
904
+ | `ClassDecorator<T>` | Class decorator type |
905
+ | `MethodDecorator<T>` | Method decorator type |
906
+ | `PropertyDecorator<T>` | Property decorator type |
907
+ | `ParameterDecorator<T>` | Parameter decorator type |
908
+ | `DecoratorResult<T>` | Decorator result type |
909
+ | `DecoratorMetadata<T>` | Decorator metadata |
910
+ | `DecoratorChain<T>` | Decorator chain |
911
+ | `ComposableDecorator<T>` | Composable decorator |
912
+
913
+ ### Type Generation *(v1.7.0)*
914
+
915
+ | Type | Description |
916
+ |------|-------------|
917
+ | `GenerateType<T>` | Generate type from schema |
918
+ | `GeneratedType<T>` | Generated type result |
919
+ | `TypeBuilder<T>` | Type builder interface |
920
+ | `SchemaToType<S>` | Convert schema to type |
921
+ | `TypeFromSchema<T, S>` | Type from schema definition |
922
+ | `GeneratedClass<T>` | Generated class type |
923
+ | `GeneratedInterface<T>` | Generated interface |
924
+ | `GeneratedEnum<T>` | Generated enum type |
925
+
926
+ ### Framework Types *(v1.7.0)*
927
+
928
+ | Type | Description |
929
+ |------|-------------|
930
+ | `NestModule<T>` | NestJS module type |
931
+ | `NestController<T>` | NestJS controller type |
932
+ | `NestService<T>` | NestJS service type |
933
+ | `ExpressApp<T>` | Express app type |
934
+ | `ExpressRouter<T>` | Express router type |
935
+ | `ExpressMiddleware<T>` | Express middleware |
936
+ | `FastifyApp<T>` | Fastify app type |
937
+ | `FastifyPlugin<T>` | Fastify plugin type |
938
+ | `KoaApp<T>` | Koa app type |
939
+ | `KoaMiddleware<T>` | Koa middleware type |
940
+
941
+ ### TypeSafe Config *(v1.7.0)*
942
+
943
+ | Type | Description |
944
+ |------|-------------|
945
+ | `SafeConfig<T>` | Type-safe configuration |
946
+ | `ConfigDefinition<T>` | Config definition |
947
+ | `ConfigValue<T, K>` | Typed config value |
948
+ | `ConfigSchema<T>` | Config schema type |
949
+ | `EnvDefinition<T>` | Environment definition |
950
+ | `EnvValue<K>` | Environment variable value |
951
+ | `ConfigPath<T>` | Config path type |
952
+ | `ValidateConfig<T>` | Config validation type |
953
+ | `MergeConfig<A, B>` | Merge configurations |
954
+ | `DeepConfig<T>` | Deep config type |
955
+
956
+ ### Type Visualization *(v1.7.0)*
957
+
958
+ | Type | Description |
959
+ |------|-------------|
960
+ | `VisualizeType<T>` | Visualize type structure |
961
+ | `TypeDiagram<T>` | Type diagram representation |
962
+ | `TypeTree<T>` | Type tree visualization |
963
+ | `PrintType<T>` | Printable type string |
964
+ | `TypeFormat<T>` | Type formatting options |
965
+ | `TypeName<T>` | Extract type name |
966
+ | `TypeStructure<T>` | Type structure info |
967
+ | `ExpandType<T>` | Expanded type display |
968
+
969
+ ### Crypto Types *(v1.7.0)*
970
+
971
+ | Type | Description |
972
+ |------|-------------|
973
+ | `HashAlgorithm` | Hash algorithm types |
974
+ | `HashOutput<L>` | Hash output type |
975
+ | `CryptoKey<T>` | Cryptographic key type |
976
+ | `KeyPair<T>` | Key pair type |
977
+ | `Signature<T>` | Signature type |
978
+ | `EncryptedData<T>` | Encrypted data type |
979
+ | `CryptoConfig<T>` | Crypto configuration |
980
+ | `CryptoProvider<T>` | Crypto provider interface |
981
+ | `HashFunction<T>` | Hash function type |
982
+ | `EncryptFunction<T>` | Encryption function |
983
+ | `DecryptFunction<T>` | Decryption function |
984
+
985
+ ### Date/Time Types *(v1.7.0)*
986
+
987
+ | Type | Description |
988
+ |------|-------------|
989
+ | `DateTime<T>` | DateTime type |
990
+ | `DateFormat<T>` | Date format type |
991
+ | `TimeFormat<T>` | Time format type |
992
+ | `Timestamp<T>` | Timestamp type |
993
+ | `Duration<T>` | Duration type |
994
+ | `DateRange<T>` | Date range type |
995
+ | `TimeZoneType` | Time zone type |
996
+ | `UTCDate<T>` | UTC date type |
997
+ | `LocalDate<T>` | Local date type |
998
+ | `ISODateString` | ISO date string |
999
+ | `ParsedDate<T>` | Parsed date type |
1000
+ | `FormatDate<T, F>` | Formatted date type |
1001
+
1002
+ ### Advanced Math *(v1.7.0)*
1003
+
1004
+ | Type | Description |
1005
+ |------|-------------|
1006
+ | `Add<A, B>` | Type-level addition |
1007
+ | `Subtract<A, B>` | Type-level subtraction |
1008
+ | `Multiply<A, B>` | Type-level multiplication |
1009
+ | `Divide<A, B>` | Type-level division |
1010
+ | `Power<A, B>` | Power operation |
1011
+ | `Sqrt<N>` | Square root |
1012
+ | `Sin<N>`, `Cos<N>` | Trigonometric functions |
1013
+ | `PI`, `E` | Math constants |
1014
+ | `Factorial<N>` | Factorial |
1015
+ | `Fibonacci<N>` | Fibonacci number |
1016
+ | `IsPrime<N>` | Prime check |
1017
+ | `Mean<T>`, `Median<T>` | Statistical functions |
1018
+ | `IsEven<N>`, `IsOdd<N>` | Even/Odd check |
1019
+
1020
+ ### Type Inference Engine *(v1.8.0)*
1021
+
1022
+ | Type | Description |
1023
+ |------|-------------|
1024
+ | `InferEngine<T>` | Type inference engine |
1025
+ | `InferContext<T>` | Inference context with type variables |
1026
+ | `InferResult<T>` | Inference result (success/error) |
1027
+ | `Deduce<T>` | Type deduction utility |
1028
+ | `Constraint<T>` | Type constraint definition |
1029
+ | `Substitution<T>` | Type substitution |
1030
+ | `TypeVar` | Type variable representation |
1031
+ | `Polymorphic<T>` | Polymorphic type |
1032
+ | `Kind`, `KindArrow`, `KindCheck<T>` | Kind system |
1033
+ | `Effect<T>`, `EffectRow`, `Effectful<T>` | Effect system |
1034
+ | `Pure<T>`, `Impure<T>` | Pure/impure computations |
1035
+
1036
+ ### Type-Level Network *(v1.8.0)*
1037
+
1038
+ | Type | Description |
1039
+ |------|-------------|
1040
+ | `Protocol`, `ProtocolVersion` | Protocol definition |
1041
+ | `HTTPMethod`, `HTTPHeaders` | HTTP types |
1042
+ | `HTTPRequest<T>`, `HTTPResponse<T>` | HTTP request/response |
1043
+ | `WSMessage<T>`, `WSFrame`, `WSOpcode` | WebSocket types |
1044
+ | `gRPCService`, `gRPCMethod<T>`, `gRPCRequest<T>` | gRPC types |
1045
+ | `TCPPacket<T>`, `UDPPacket<T>`, `SocketAddress` | TCP/UDP types |
1046
+ | `ProtoMessage`, `ProtoField<T>` | Protocol Buffers |
1047
+ | `MQTTPacket<T>`, `MQTTQoS` | MQTT types |
1048
+
1049
+ ### Type-Level File System *(v1.8.0)*
1050
+
1051
+ | Type | Description |
1052
+ |------|-------------|
1053
+ | `Path`, `AbsolutePath`, `RelativePath` | Path types |
1054
+ | `ParsePath<P>`, `JoinPath<P1, P2>` | Path operations |
1055
+ | `File`, `FileContent<T>`, `FileType` | File types |
1056
+ | `Directory`, `DirectoryEntry<T>` | Directory types |
1057
+ | `FileWatch<T>`, `WatchEvent<T>` | File watching |
1058
+ | `VirtualFS<T>`, `VFSNode<T>` | Virtual file system |
1059
+ | `Archive`, `ArchiveFormat` | Archive types |
1060
+ | `MimeType`, `FileMetadata` | File metadata |
1061
+
1062
+ ### Type-Level Compiler *(v1.8.0)*
1063
+
1064
+ | Type | Description |
1065
+ |------|-------------|
1066
+ | `CompilerPlugin<T>` | Compiler plugin |
1067
+ | `Macro<T>`, `MacroExpansion<T>` | Macro system |
1068
+ | `Diagnostic`, `DiagnosticLevel` | Compiler diagnostics |
1069
+ | `SymbolTable`, `CompilerSymbol` | Symbol management |
1070
+ | `Visitor<T>`, `TransformPass<T>` | AST visitor pattern |
1071
+
1072
+ ### Type-Level Debugging *(v1.8.0)*
1073
+
1074
+ | Type | Description |
1075
+ |------|-------------|
1076
+ | `DebugSession`, `DebugStatus` | Debug session |
1077
+ | `Breakpoint`, `BreakpointLocation` | Breakpoint types |
1078
+ | `StackTrace`, `DebugStackFrame` | Stack trace |
1079
+ | `Variable`, `VariableValue` | Variable inspection |
1080
+ | `MemoryRegion`, `MemoryAddress` | Memory debugging |
1081
+ | `DebugProtocol` | Debug protocol (DAP) |
1082
+ | `REPL`, `REPLCommand<T>` | REPL interface |
1083
+
1084
+ ### Type-Level Optimizer *(v1.8.0)*
1085
+
1086
+ | Type | Description |
1087
+ |------|-------------|
1088
+ | `Optimization<T>`, `OptimizationLevel` | Optimization types |
1089
+ | `TreeShake<T>`, `ShallowResult<T>` | Tree shaking |
1090
+ | `DeadCode`, `DeadCodeAnalysis<T>` | Dead code elimination |
1091
+ | `Inline<T>`, `InlineCandidate<T>` | Function inlining |
1092
+ | `ConstantFold<T>` | Constant folding |
1093
+ | `MinifyType<T>` | Type minification |
1094
+ | `PerformanceHint<T>` | Optimization hints |
1095
+
1096
+ ### Type-Level Docgen *(v1.8.0)*
1097
+
1098
+ | Type | Description |
1099
+ |------|-------------|
1100
+ | `Documentation<T>`, `DocGenEntry<T>` | Documentation structure |
1101
+ | `JSDoc<T>`, `JSDocTag<T>` | JSDoc parsing |
1102
+ | `APIDoc<T>`, `APIEndpoint<T>` | API documentation |
1103
+ | `DocSearch<T>`, `SearchIndex` | Documentation search |
1104
+ | `DocNavigation<T>`, `DocSidebar<T>` | Documentation navigation |
1105
+ | `DocFormat` | Output format (markdown, html, json) |
1106
+
1107
+ ### Type-Level Test Framework *(v1.8.0)*
1108
+
1109
+ | Type | Description |
1110
+ |------|-------------|
1111
+ | `TestGroup`, `TestSetup`, `TestTeardown` | Test organization |
1112
+ | `Assert`, `AssertExtends<T, U>` | Type assertions |
1113
+ | `MockFunction`, `TimerMock` | Mock utilities |
1114
+ | `CoverageProvider`, `CoverageReporter` | Coverage types |
1115
+ | `SnapshotSerializer` | Snapshot serialization |
1116
+ | `Worker`, `WorkerPool` | Parallel test execution |
1117
+
1118
+ ### Type-Level Package Manager *(v1.8.0)*
1119
+
1120
+ | Type | Description |
1121
+ |------|-------------|
1122
+ | `PkgPackage<T>`, `PackageName` | Package types |
1123
+ | `Dependencies`, `Dependency<T>` | Dependency types |
1124
+ | `SemVer`, `SemVerRange`, `SemVerDiff` | SemVer types |
1125
+ | `LockFile<T>`, `LockFormat` | Lock file types |
1126
+ | `Workspace<T>`, `WorkspaceGraph<T>` | Workspace/monorepo |
1127
+ | `RegistryAuth`, `RegistryPackage<T>` | Registry types |
1128
+ | `Vulnerability` | Security vulnerability |
1129
+
1130
+ ### Type-Level Search *(v1.7.0)*
1131
+
1132
+ | Type | Description |
1133
+ |------|-------------|
1134
+ | `Sort<T, Order>` | Sort tuple |
1135
+ | `QuickSort<T>` | Quick sort algorithm |
1136
+ | `MergeSort<T>` | Merge sort algorithm |
1137
+ | `BinarySearch<T, V>` | Binary search |
1138
+ | `Includes<T, V>` | Check inclusion |
1139
+ | `Filter<T, P>` | Filter by predicate |
1140
+ | `Take<T, N>` | Take first N elements |
1141
+ | `Drop<T, N>` | Drop first N elements |
1142
+ | `Chunk<T, N>` | Chunk into sublists |
1143
+ | `Union<A, B>` | Set union |
1144
+ | `Intersection<A, B>` | Set intersection |
1145
+ | `Unique<T>` | Unique elements |
1146
+ | `Reverse<T>` | Reverse tuple |
1147
+ | `Zip<A, B>` | Zip tuples |
1148
+ | `Flatten<T>` | Flatten nested tuples |
1149
+ | `MinElement<T>`, `MaxElement<T>` | Min/Max element |
1150
+
885
1151
  ## Examples
886
1152
 
887
1153
  ```typescript