HEX
Server: LiteSpeed
System: Linux houston.panomity.com 6.8.0-100-generic #100-Ubuntu SMP PREEMPT_DYNAMIC Tue Jan 13 16:40:06 UTC 2026 x86_64
User: nudepix (1011)
PHP: 7.4.33
Disabled: pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare,
Upload Files
File: //opt/LC/node_modules/write-json-file/index.d.ts
declare namespace writeJsonFile {
	type Replacer = (this: unknown, key: string, value: any) => unknown;
	type SortKeys = (a: string, b: string) => number;
	type JSONStringifyable = string | number | boolean | null | object;

	interface Options {
		/**
		Indentation as a string or number of spaces. Pass in null for no formatting.

		@default '\t'
		*/
		readonly indent?: string | number | null;

		/**
		Detect indentation automatically if the file exists.

		@default false
		*/
		readonly detectIndent?: boolean;

		/**
		Sort the keys recursively. Optionally pass in a compare function.

		@default false
		*/
		readonly sortKeys?: boolean | SortKeys;

		/**
		Passed into `JSON.stringify`.
		*/
		readonly replacer?: Replacer | Array<number | string>;

		/**
		Mode used when writing the file.

		@default 0o666
		*/
		readonly mode?: number;
	}
}

declare const writeJsonFile: {
	/**
	Stringify and write JSON to a file atomically.

	Creates directories for you as needed.

	@example
	```
	import writeJsonFile = require('write-json-file');

	(async () => {
		await writeJsonFile('foo.json', {foo: true});
	})();
	```
	*/
	(
		filepath: string,
		data: writeJsonFile.JSONStringifyable,
		options?: writeJsonFile.Options
	): Promise<void>;

	/**
	Stringify and write JSON to a file atomically.

	Creates directories for you as needed.

	@example
	```
	import writeJsonFile = require('write-json-file');

	writeJsonFile.sync('foo.json', {foo: true});
	```
	*/
	sync(
		filepath: string,
		data: writeJsonFile.JSONStringifyable,
		options?: writeJsonFile.Options
	): void;

	// TODO: Remove this for the next major release
	default: typeof writeJsonFile;
};

export = writeJsonFile;