@snailicide/build-config / utilities
utilities
Functions
| Function | Description |
|---|---|
| getFileExtensionList | - |
| globFileFilter | - |
| isPlainObject | - |
| safeDeserializeJSON | - |
| importJSON | - |
Type Aliases
Array
| Type Alias | Description |
|---|---|
| MergeDeep | Merge two objects or two arrays/tuples recursively into a new type. |
| PartialDeep | Create a type from another type with all keys and nested keys set to optional. |
JSON
| Type Alias | Description |
|---|---|
| Jsonifiable | Matches a value that can be losslessly converted to JSON. |
| Jsonify | Transform a type to one that is assignable to the JsonValue type. |
Map
| Type Alias | Description |
|---|---|
| PartialDeep | Create a type from another type with all keys and nested keys set to optional. |
Object
| Type Alias | Description |
|---|---|
| LiteralToPrimitiveDeep | Like LiteralToPrimitive except it converts literal types inside an object or array deeply. |
| MergeDeep | Merge two objects or two arrays/tuples recursively into a new type. |
| Merge | Merge two types into a new type. Keys of the second type overrides keys of the first type. |
| PartialDeep | Create a type from another type with all keys and nested keys set to optional. |
| SimplifyDeep | Deeply simplifies an object type. |
| Simplify | Useful to flatten the type output to improve type hints shown in editors. And also to transform an interface into a type to aide with assignability. |
| Stringified | Create a type with the keys of the given type changed to string type. |
| ValueOf | Create a union of the given object's values, and optionally specify which keys to get the values from. |
Other
| Type Alias | Description |
|---|---|
| JSFileExtensions | - |
| TSFileExtensions | - |
| JSLikeFileExtensions | - |
| PrettierFileExtensions | - |
| AllowedExtensions | - |
| LintStagedConfig | - |
| NotAssignableToJson | - |
| JSONCompatible | - |
Set
| Type Alias | Description |
|---|---|
| PartialDeep | Create a type from another type with all keys and nested keys set to optional. |
Type
| Type Alias | Description |
|---|---|
| LiteralToPrimitiveDeep | Like LiteralToPrimitive except it converts literal types inside an object or array deeply. |
| LiteralToPrimitive | Given a literal type return the primitive type it belongs to, or never if it's not a primitive. |
| LiteralUnion | Allows creating a union type by combining primitive types and literal types without sacrificing auto-completion in IDEs for the literal type part of the union. |
| Primitive | Matches any primitive value. |
Utilities
| Type Alias | Description |
|---|---|
| MergeDeep | Merge two objects or two arrays/tuples recursively into a new type. |
Variables
| Variable | Description |
|---|---|
| JS_FILE_EXTENSIONS | - |
| TS_FILE_EXTENSIONS | - |
| JSLIKE_FILE_EXTENSIONS | - |
| PRETTIER_FILE_EXTENSIONS | - |
| default | - |