Optimize rendering

This commit is contained in:
Fedor Indutny 2021-08-11 09:23:21 -07:00 committed by GitHub
parent 81f06e2404
commit 12c78c742f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
34 changed files with 702 additions and 444 deletions

View file

@ -35,3 +35,19 @@ export enum ScrollBehavior {
Default = 'default',
Hard = 'hard',
}
type InternalAssertProps<
Result,
Value,
Missing = Omit<Result, keyof Value>
> = keyof Missing extends never
? Result
: Result &
{
[key in keyof Required<Missing>]: [
never,
'AssertProps: missing property'
];
};
export type AssertProps<Result, Value> = InternalAssertProps<Result, Value>;