32 lines
2.1 KiB
TypeScript
32 lines
2.1 KiB
TypeScript
import { StudioComponentDataPropertyBinding, StudioComponentSimplePropertyBinding, StudioComponentEventPropertyBinding, StudioComponentSlotBinding, StudioComponentSort } from '@aws-amplify/codegen-ui';
|
|
import ts, { StringLiteral, NumericLiteral, BooleanLiteral, NullLiteral, ArrayLiteralExpression, ObjectLiteralExpression, BindingName, Expression, ArrowFunction } from 'typescript';
|
|
import { ReactRenderConfig } from './react-render-config';
|
|
export declare const defaultRenderConfig: {
|
|
script: ts.ScriptKind;
|
|
target: ts.ScriptTarget;
|
|
module: ts.ModuleKind;
|
|
includeUseClientDirective: boolean;
|
|
};
|
|
export declare function transpile(code: string, renderConfig: ReactRenderConfig, shouldFormatCode?: boolean): {
|
|
componentText: string;
|
|
declaration?: string;
|
|
};
|
|
export declare function buildPrinter(fileName: string, renderConfig: ReactRenderConfig): {
|
|
printer: ts.Printer;
|
|
file: ts.SourceFile;
|
|
};
|
|
/**
|
|
* (s: SortPredicate<User>) => s.firstName('ASCENDING').lastName('DESCENDING')
|
|
*/
|
|
export declare const buildSortFunction: (model: string, sort: StudioComponentSort[]) => ArrowFunction;
|
|
export declare function getDeclarationFilename(filename: string): string;
|
|
export declare type json = string | number | boolean | null | json[] | {
|
|
[key: string]: json;
|
|
};
|
|
export declare function jsonToLiteral(jsonObject: json, tryAndMarshallStringsToObjects?: boolean): ObjectLiteralExpression | StringLiteral | NumericLiteral | BooleanLiteral | NullLiteral | ArrayLiteralExpression;
|
|
export declare function bindingPropertyUsesHook(binding: StudioComponentDataPropertyBinding | StudioComponentSimplePropertyBinding | StudioComponentEventPropertyBinding | StudioComponentSlotBinding): boolean;
|
|
export declare function formatCode(code: string): string;
|
|
export declare const buildBaseCollectionVariableStatement: (identifier: string | BindingName, expression: Expression) => ts.VariableStatement;
|
|
export declare const createHookStatement: (variableName: string, methodName: string, props: ObjectLiteralExpression) => ts.VariableStatement;
|
|
export declare const getAmplifyJSClientGenerator: () => ts.VariableStatement;
|