UNPKG

@appsemble/lang-sdk

Version:

Language SDK for Appsemble

24 lines (23 loc) 1.05 kB
import { type RemapperContext } from './remap.js'; import { type AppMemberInfo, type Remappers } from './types/index.js'; export interface RemapperExample { input: unknown; remapper: unknown; result: unknown; skip?: boolean; } type CustomRemapperKeys = 'app.id' | 'app.locale' | 'app.url' | 'array.map.1' | 'if.else' | 'if.then' | 'None'; export type RemapperExampleKeys = CustomRemapperKeys | Exclude<keyof Remappers, 'app' | 'if'>; export declare const examples: Record<RemapperExampleKeys, RemapperExample>; /** * @param remapper The remapper example to use. * @param options The options specifying how to display the example. * @returns Example based on the input options. */ export declare function schemaExample(remapper: keyof typeof examples, options?: { input?: 'inline' | 'pretty'; result?: 'inline' | 'pretty'; exclude?: ('input' | 'remapper' | 'result')[]; }): string; export declare function createExampleContext(url: URL, lang: string, userInfo?: AppMemberInfo, history?: []): RemapperContext; export {};