locutus
Version:
Locutus other languages' standard libraries to JavaScript for fun and educational purposes
12 lines (11 loc) • 488 B
TypeScript
import type { PhpRuntimeValue } from '../_helpers/_phpTypes.ts';
type CountValue = PhpRuntimeValue;
type CountableList = CountValue[];
interface CountableAssoc {
[key: string]: CountValue;
}
export type Countable = CountableList | CountableAssoc;
export type CountMode = 0 | 1 | 'COUNT_NORMAL' | 'COUNT_RECURSIVE';
export declare function count(mixedVar: null | undefined, mode?: CountMode): 0;
export declare function count(mixedVar: Countable, mode?: CountMode): number;
export {};