Type Definitions
It is possible, but not required, to generate TypeScript type definitions from Go structs using types.Generate[T]() , where T is the type you wish to generate.

1
Define your Go types.
package welcome

type Props struct {
    Message string `json:"message"`
    Error   string `json:"error"`
}
Note
All json tags are optional.
2
Create types program.
Create a new types/main.go in your project program and call types.Generate[T]() inside it for each type.
package main

import (
    "main/lib/core/types"
    "main/lib/routes/todos"
)

func main() {
    _ = types.Generate[todos.Props]()
}
2
Generate types.
Run the program
frizzante generate type
# or go run ./types

This will generate your type definitions in app/lib/types/server .
export type Props = welcome.Props
export declare namespace welcome {
    export type Props = {
        message: string
        error: string
    }
}
Tip
You can use the default $lib alias to access the app/lib directory.
<script lang="ts">
    import type { Props } from "$lib/types/server/main/lib/routes/welcome/props"
    let { message, error }:Props = $props()
</script>