Skip to content
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

Patch v0.1.65 #216

Merged
merged 1 commit into from
May 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,8 @@ When in doubt simplify.
* [Unified Turing Machine](https://github.com/Phuire-Research/Stratimux/blob/main/The-Unified-Turing-Machine.md) - The governing concept for this entire framework.

## Change Log ![Tests](https://github.com/Phuire-Research/Stratimux/actions/workflows/node.js.yml/badge.svg)
### v0.1.65 5/13/2024
* Removed one more level of deepness from DotPath(6 levels now), projects should now compile without the excessively deep error.
### v0.1.64 5/13/2024
* Added Action Priority: This will allow action's assigned a priority of not 0 to be placed accordingly into the action ques.
* Adjusted DotPath type to improve type checking performance. Massively degrades with an additional level.
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "stratimux",
"license": "GPL-3.0",
"version": "0.1.64",
"version": "0.1.65",
"description": "Unified Turing Machine",
"main": "dist/index.js",
"module": "dist/index.mjs",
Expand Down
39 changes: 20 additions & 19 deletions src/model/dotPath.ts
Original file line number Diff line number Diff line change
Expand Up @@ -139,29 +139,30 @@ type DotPathFive<
:
Required<T>[K] extends ValidObject<Required<T>[K]>
?
DotPathSix<Required<T>[K], Union<Prev, Path>, Join<Path, K>, PrevTypes | T>
:
Union<Union<Prev, Path>, Join<Path, K>>;
}[keyof T];

type DotPathSix<
T extends object,
Prev extends Key | undefined = undefined,
Path extends Key | undefined = undefined,
PrevTypes extends object = T
> = string &
{
[K in keyof T]:
T[K] extends PrevTypes | T
? Union<Union<Prev, Path>, Join<Path, K>>
:
Required<T>[K] extends ValidObject<Required<T>[K]>
?
// DotPathSevenEnd<Required<T>[K], Union<Prev, Path>, Join<Path, K>, PrevTypes | T>
// DotPathSix<Required<T>[K], Union<Prev, Path>, Join<Path, K>, PrevTypes | T>
Union<Union<Prev, Path>, Join<Path, K>>
:
Union<Union<Prev, Path>, Join<Path, K>>;
}[keyof T];
// 7 levels does not allow for builds
// type DotPathSix<
// T extends object,
// Prev extends Key | undefined = undefined,
// Path extends Key | undefined = undefined,
// PrevTypes extends object = T
// > = string &
// {
// [K in keyof T]:
// T[K] extends PrevTypes | T
// ? Union<Union<Prev, Path>, Join<Path, K>>
// :
// Required<T>[K] extends ValidObject<Required<T>[K]>
// ?
// // DotPathSevenEnd<Required<T>[K], Union<Prev, Path>, Join<Path, K>, PrevTypes | T>
// Union<Union<Prev, Path>, Join<Path, K>>
// :
// Union<Union<Prev, Path>, Join<Path, K>>;
// }[keyof T];
// Beyond this point Typescript massively slows down during type checking.
// // After this point will trigger TS excessively deep error and can no longer use DotPath as circular reference.
// type DotPathSevenEnd<
Expand Down
4 changes: 2 additions & 2 deletions src/model/selector.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export type KeyedSelector = {
/**
* Will create a new KeyedSelector based on a concept name comparison during runtime, mainly used for external usage
* @param keys - type string - Format is 'key0.key1.key3' for deep nested key values
* @tutorial *Note* This will only extend 7 levels into a deeply nested record.
* @tutorial *Note* This will only extend 6 levels into a deeply nested record.
* @tutorial **Use createAdvancedKeys** function in place of keys if attempted to scaffold into through arrays
*/
export const createConceptKeyedSelector =
Expand Down Expand Up @@ -52,7 +52,7 @@ export const createConceptKeyedSelector =
* Will create a new KeyedSelector during runtime, for usage throughout Stratimux
* @param keys - type string - Format is 'key0.key1.key3' for deep nested key values
* Uses type DotPath<T> to enable some DX in the IDE to quickly create the desired string format.
* @tutorial *Note* This will only extend 7 levels into a deeply nested record.
* @tutorial *Note* This will only extend 6 levels into a deeply nested record.
* @tutorial **Use createAdvancedKeys** function in place of keys if attempted to scaffold into through arrays
*/
export const createUnifiedKeyedSelector = <T extends Record<string, unknown>>(
Expand Down
Loading