mirror of
https://github.com/yume-chan/ya-webadb.git
synced 2025-10-04 18:29:23 +02:00
feat(struct): disallow defined fields in extra
This commit is contained in:
parent
ece9acdc80
commit
f56b253d7d
1 changed files with 6 additions and 1 deletions
|
@ -288,7 +288,12 @@ export default class Struct<
|
|||
return this.array(name, Array.SubType.String, options);
|
||||
};
|
||||
|
||||
public extra<TValue extends object>(
|
||||
public extra<TValue extends Record<
|
||||
Exclude<
|
||||
keyof TValue,
|
||||
Exclude<keyof TValue, keyof TResult>>,
|
||||
never
|
||||
>>(
|
||||
value: TValue & ThisType<WithBackingField<Overwrite<Overwrite<TExtra, TValue>, TResult>>>
|
||||
): Struct<
|
||||
TResult,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue