Skip to content

@serenity-is/corelib / extend

Function: extend()

extend<T>(a, b): T

Defined in: src/compat/system-compat.ts:39

Shallow-copies properties from b onto a, mutating a — equivalent to Object.assign(a, b).

Type Parameters

T

T = any

The common object type.

Parameters

a

T

The target object to extend (mutated and returned).

b

T

The source object whose own properties are copied onto a.

Returns

T

The mutated target object a.

Deprecated

Use Object.assign directly.