/** * The quick API: one value, one line, no config file. * * import { tdc } from 'tdcv2'; * * tdc.person.male.firstName(); // John * tdc.country.usa.docs.ssn(); // 690070001, check digits and all * tdc.lang.ru.person.lastName(); // Иванов * tdc.person.lastName.many(10); // ten of them * tdc.seed('demo').locale('ru').person.lastName(); * tdc.gen.number('20..30'); // "23" * * ONE RULE: a dot in the code is a dot in the address. `person.male.firstName` * here is `person.male.firstName` in a config and in the reference. Any * shorthand would be a second vocabulary to learn, keep in step with the docs, * and carry into four other languages. * * A leading segment may be left out, exactly as in a config: then the address * is read against the active locale. `tdc.person.lastName()` gives Williams in * `en` and Иванов in `ru`. * * To name a pack outright, say what kind it is: `tdc.lang.ru.…` for a language * and `tdc.country.usa.…` for a country. Those two words carry no meaning in an * address — they are there so the completion list at `tdc.` stays a list of * CATEGORIES. Putting 122 locale and country codes in with them turned it into * a wall of names nobody could read. * * WHAT THIS IS NOT. Every call is independent. Nothing here ties one value to * another — no `` on a drawn column, no `parent=`, no `uniq`, no * ``. A coherent record is a config; this is the drawer of loose * values that Faker occupies, answered with the same data packs. * * Values are always strings, including numbers and dates: the engine's world is * text, and a result type that changed with the address would break both * autocomplete and the ports. */ import type { QuickAddressTree } from './addresses.js'; import { TdcQuickError } from './draw.js'; import type { QuickGen } from './types.js'; export { TdcQuickError, BATCH_ROWS } from './draw.js'; export type { QuickAddress, QuickGen, QuickGenCall, QuickParams } from './types.js'; export type { QuickAddressTree } from './addresses.js'; /** * What `tdc` is: three named things, and every bundled address by name. * * `seed` and `locale` return a NEW object rather than changing this one, so * two tests can hold different seeds at the same time. */ export type QuickTdc = QuickAddressTree & { readonly seed: (value: string) => QuickTdc; readonly locale: (value: string) => QuickTdc; readonly gen: QuickGen; }; /** * Words the API answers to at the ROOT, so no data CATEGORY may be called one * of them. `location.country` is fine — `country` there is a leaf, and only the * first name after `tdc.` is intercepted. */ export declare const RESERVED_ROOT_NAMES: ReadonlySet; /** * Words the API answers to at EVERY level of an address, so no segment * anywhere may be called one of them. There is exactly one, and a test holds * the bundled packs to it. */ export declare const RESERVED_PATH_NAMES: ReadonlySet; /** * The default entry point: random per process, locale from the project config. * * `tdc.seed(...)` and `tdc.locale(...)` each return a NEW quick object and * change nothing globally, so two tests can hold different seeds at once. */ export declare const tdc: QuickTdc; export { TdcQuickError as QuickError }; //# sourceMappingURL=index.d.ts.map