@jswalden/streaming-json
Version:
Streaming JSON parsing and stringification for JavaScript/TypeScript
20 lines (19 loc) • 866 B
TypeScript
/**
* Attempt to define an enumerable, configurable, writable property of the given
* name with the specified value. Return true/false indicating whether the
* definition attempt succeeded.
*
* (The attempt will not succeed if it would redefine a nonconfigurable property
* or would add a new property to a nonextensible `obj`.)
*
* @see https://tc39.es/ecma262/#sec-createdataproperty
*/
export declare function CreateDataProperty(obj: object, key: string | number | symbol, value: unknown): boolean;
/**
* Return an array of the names of all own properties of `obj`.
*
* @see https://tc39.es/ecma262/#sec-enumerableownproperties
*/
export declare function EnumerableOwnPropertyKeys(obj: object): string[];
/** Perform and return `obj.[[Delete]](prop)`. */
export declare function DeleteProperty(obj: object, prop: string | number | symbol): boolean;