@epilogo/stringifyr
Version:
Stringifyr JS bundle
27 lines (26 loc) • 1.13 kB
TypeScript
import { Stringifyr, TStringifyrParams } from "../stringifyr/Stringifyr";
import { TReact } from '../react/ReactTypes';
type TStringifyrReactParams = TStringifyrParams & {
react?: {
React: TReact;
window?: typeof window & {
stringifyr?: Stringifyr;
StringifyrReact?: typeof StringifyrReact;
};
};
};
export declare function StringifyrReact({ isDev, apiKey, baseURL, storage, fetchOnLoadWithParams, react: { window: globalWindow, React, } }: TStringifyrReactParams): {
stringifyr: Stringifyr;
useNode: <T extends string>(template: T, variables?: any) => import("../stringifyr/Stringifyr").TLeafObject<string, import("../stringifyr/Api").TString>;
useNodeValue: <T_1 extends string, R>(template: T_1, defaultValue?: R) => R;
value: (template: string, variables?: object) => any;
/**
* @deprecated
* Instead of exposing as array and losing the key information
* expose another type eg a .map({...info}) function
* @param template
* @param variables
*/
array: (template: string, variables?: object) => any[];
};
export {};