Skip to main content

Function: createNullPrototypeObject()

createNullPrototypeObject<T>(shape?: T): T

Defined in: shared/utils/objectSafety.ts:25

Creates a null-prototype object with a specific compile-time shape.

Type Parametersโ€‹

Tโ€‹

T extends object

Parametersโ€‹

shape?โ€‹

T

Returnsโ€‹

T

Remarksโ€‹

This centralizes the only โ€œunsafeโ€ assertion needed for prototype-pollution hardening so callers do not need their own eslint-disable comments.