mirror of
https://github.com/yume-chan/ya-webadb.git
synced 2025-10-06 03:50:18 +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);
|
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>>>
|
value: TValue & ThisType<WithBackingField<Overwrite<Overwrite<TExtra, TValue>, TResult>>>
|
||||||
): Struct<
|
): Struct<
|
||||||
TResult,
|
TResult,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue