Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion internal/printer/print-to-tsx.go
Original file line number Diff line number Diff line change
Expand Up @@ -375,7 +375,9 @@ func renderTsx(p *printer, n *Node, o *TSXOptions) {
}
}

p.print(fmt.Sprintf("export default function %s%s(_props: %s%s): any {}\n", componentName, props.Statement, propsIdent, props.Generics))
p.print(fmt.Sprintf("export default function %s%s(_props: %s%s%s): any {}\n", componentName, props.Statement, propsIdent, props.Generics, ` & {
[key in keyof (Omit<import("astro").AstroBuiltinProps, "server:defer"> & import("astro").AstroClientDirectives)]: never;
}`))
if hasGetStaticPaths {
p.printf(`type ASTRO__ArrayElement<ArrayType extends readonly unknown[]> = ArrayType extends readonly (infer ElementType)[] ? ElementType : never;
type ASTRO__Flattened<T> = T extends Array<infer U> ? ASTRO__Flattened<U> : T;
Expand Down
Loading