Function: redeclare()
function redeclare<V, M>(field, meta): ConfigField<V, M>;
Defined in: packages/overcast-core/src/config-schema.ts:183
Declare a new field that parses exactly like field, under its own meta.
For a host field that is one of a layer's values with a different meaning — "the operator's address", validated as this chain's address — so it gets the layer's encoding check without the host restating it:
operatorKey: redeclare(EVM_CONFIG_SCHEMA.shape.owner, {
env: "OPERATOR_KEY",
describe: "address of the operator users delegate signing to",
}),
Nothing of field's own metadata carries over: a field with a new name is a
new field, and a secret or scope it inherited silently would be wrong as
often as right.
Type Parameters
| Type Parameter | Default type |
|---|---|
V | - |
M extends ConfigMeta | ConfigMeta |
Parameters
| Parameter | Type |
|---|---|
field | ConfigField<V, ConfigMeta> |
meta | M |
Returns
ConfigField<V, M>