Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(router): add userdata generic to addHandler (#1547)
- Loading branch information
Showing
3 changed files
with
51 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
// Do not convert this file to .d.ts | ||
|
||
type IsEqual<T, U> = | ||
(<G>() => G extends T ? 1 : 2) extends | ||
(<G>() => G extends U ? 1 : 2) | ||
? true | ||
: false; | ||
|
||
type Filter<KeyType, ExcludeType> = IsEqual<KeyType, ExcludeType> extends true ? never : (KeyType extends ExcludeType ? never : KeyType); | ||
|
||
export type Except<ObjectType, KeysType extends keyof ObjectType> = { | ||
[KeyType in keyof ObjectType as Filter<KeyType, KeysType>]: ObjectType[KeyType]; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters