UNPKG

653 BTypeScriptView Raw
1import * as React from 'react';
2export declare type IdSourceType = {
3 value: number;
4 prefix: string;
5 uid: (item: any, index?: number) => string;
6};
7export declare const createSource: (prefix?: string) => IdSourceType;
8export interface UIDProps {
9 name?: (n: string | number) => string;
10 idSource?: IdSourceType;
11 children: (id: string, uid: (item: any, index?: number) => string) => React.ReactNode;
12}
13export declare const counter: IdSourceType;
14export declare const source: React.Context<IdSourceType>;
15export declare const getId: (source: IdSourceType) => number;
16export declare const getPrefix: (source?: IdSourceType) => string;