Skip to content
Open
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
14 changes: 9 additions & 5 deletions packages/preact/src/types/path.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,13 +38,17 @@ type PathValue<TValue, TPath> = TPath extends `${infer TKey1}.${infer TKey2}`
? PathValue<TValue[TKey1], TKey2>
: never
: TKey1 extends `${ArrayKey}`
? TValue extends Array<infer TChild>
? PathValue<TChild, TKey2 & (ValuePaths<TChild> | ArrayPaths<TChild>)>
? TValue extends Array<infer TChild>
? PathValue<TChild, TKey2 & (ValuePaths<TChild> | ArrayPaths<TChild>)>
: never
: never
: never
: TPath extends keyof TValue
? TValue[TPath]
: never;
? TValue[TPath]
: TPath extends `${ArrayKey}`
? TValue extends Array<infer TChild>
? TChild
: never
: never;

/**
* See {@link PathValue}
Expand Down
14 changes: 9 additions & 5 deletions packages/qwik/src/types/path.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,13 +38,17 @@ type PathValue<TValue, TPath> = TPath extends `${infer TKey1}.${infer TKey2}`
? PathValue<TValue[TKey1], TKey2>
: never
: TKey1 extends `${ArrayKey}`
? TValue extends Array<infer TChild>
? PathValue<TChild, TKey2 & (ValuePaths<TChild> | ArrayPaths<TChild>)>
? TValue extends Array<infer TChild>
? PathValue<TChild, TKey2 & (ValuePaths<TChild> | ArrayPaths<TChild>)>
: never
: never
: never
: TPath extends keyof TValue
? TValue[TPath]
: never;
? TValue[TPath]
: TPath extends `${ArrayKey}`
? TValue extends Array<infer TChild>
? TChild
: never
: never;

/**
* See {@link PathValue}
Expand Down
14 changes: 9 additions & 5 deletions packages/react/src/types/path.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,13 +38,17 @@ type PathValue<TValue, TPath> = TPath extends `${infer TKey1}.${infer TKey2}`
? PathValue<TValue[TKey1], TKey2>
: never
: TKey1 extends `${ArrayKey}`
? TValue extends Array<infer TChild>
? PathValue<TChild, TKey2 & (ValuePaths<TChild> | ArrayPaths<TChild>)>
? TValue extends Array<infer TChild>
? PathValue<TChild, TKey2 & (ValuePaths<TChild> | ArrayPaths<TChild>)>
: never
: never
: never
: TPath extends keyof TValue
? TValue[TPath]
: never;
? TValue[TPath]
: TPath extends `${ArrayKey}`
? TValue extends Array<infer TChild>
? TChild
: never
: never;

/**
* See {@link PathValue}
Expand Down
14 changes: 9 additions & 5 deletions packages/solid/src/types/path.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,13 +38,17 @@ type PathValue<TValue, TPath> = TPath extends `${infer TKey1}.${infer TKey2}`
? PathValue<TValue[TKey1], TKey2>
: never
: TKey1 extends `${ArrayKey}`
? TValue extends Array<infer TChild>
? PathValue<TChild, TKey2 & (ValuePaths<TChild> | ArrayPaths<TChild>)>
? TValue extends Array<infer TChild>
? PathValue<TChild, TKey2 & (ValuePaths<TChild> | ArrayPaths<TChild>)>
: never
: never
: never
: TPath extends keyof TValue
? TValue[TPath]
: never;
? TValue[TPath]
: TPath extends `${ArrayKey}`
? TValue extends Array<infer TChild>
? TChild
: never
: never;

/**
* See {@link PathValue}
Expand Down