mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2025-10-16 12:05:41 +00:00
* Add type definitions for 'php-serialize' * Modifying tscconfig.json to the guidelines * Add missing type definitions header * Add test file into tsconfig * Fix typing and remove unused variable declaration * Fix optional function parameters * Add empty line for linter * Update types/php-serialize/index.d.ts Co-Authored-By: Dmitry Demensky <10235949+demensky@users.noreply.github.com> * Update types/php-serialize/index.d.ts Co-Authored-By: Dmitry Demensky <10235949+demensky@users.noreply.github.com> * Update types/php-serialize/index.d.ts Co-Authored-By: Dmitry Demensky <10235949+demensky@users.noreply.github.com> * Update index.d.ts * Update tsconfig.json * Revert tsconfig.json chnages * Add reference types header for node Co-authored-by: Dmitry Demensky <10235949+demensky@users.noreply.github.com>
26 lines
834 B
TypeScript
26 lines
834 B
TypeScript
// Type definitions for php-serialize 3.0
|
|
// Project: https://github.com/steelbrain/php-serialize
|
|
// Definitions by: Changhui Lee <https://github.com/blurfx>
|
|
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
|
// TypeScript Version: 3.7
|
|
|
|
/// <reference types="node" />
|
|
|
|
export interface SerializeOptions {
|
|
/** @default 'utf8' */
|
|
readonly encoding?: 'utf8' | 'binary';
|
|
}
|
|
|
|
export interface UnserializeOptions {
|
|
/** @default true' */
|
|
readonly strict?: boolean;
|
|
/** @default 'utf8' */
|
|
readonly encoding?: 'utf8' | 'binary';
|
|
}
|
|
|
|
export function isSerialized(givenItem: any, strict?: boolean): boolean;
|
|
|
|
export function serialize(item: any, scope?: any, givenOptions?: SerializeOptions): string;
|
|
|
|
export function unserialize(item: string | Buffer, scope?: any, givenOptions?: UnserializeOptions): any;
|