/** * Stub definitions that will be replaced by the transformer. * They're used to provide type definitions for the typescript * compiler and various static analysis tools. * * From https://github.com/KonstantinSimeonov/tsx-control-statements/blob/master/transformer/components.ts */ export function Choose(props: { children?: any }) { return props.children; } export function When(props: { children?: any; condition: boolean }) { return props.children; } export function If(props: { children?: any; condition: boolean }) { return props.children; } type NoBody = { children?: any; each: string; of: Iterable; index?: string; }; type WithBody = { children?: any; of: Iterable; body: (x: T, index: number) => any; }; export function For(props: NoBody | WithBody) { return props.children; } export function Otherwise(props: { children?: any }) { return props.children; } export function With(props: { [id: string]: any }) { return props.children; }