inside a vanilla HTML container.
*
* Note: Preview version is missing several features:
* - Ability to customize HTML container
* - Add SSR hooks (for Server Side Rendering)
*/
function spa(f: spa.Input, opts?: spa.Options): spa.Output;
namespace spa {
export type Input = () => JSX.Element;
export type Output = {
url: string;
};
export interface Options {
/**
* Customize the HTML container.
* Container must include a div with id="root"
*
* @deprecated not implemented in preview version
*/
html?: string;
}
}
namespace domain {
type Input = {
/**
* A list of simple routes and the components they resolve to.
* In the preview version, routes can only be simple strings (ex: "home", "about"),
* But in the full version we support routes with parameters
* ```typescript
*
* ```
*/
[route: string]: lambda.Output
| spa.Output;
};
type Output = {};
}
/**
*
* The magic.domain component lets you attach several components to a domain (web).
*
* In the preview version, routes can only be simple paths ("home", "/", "about").
*
* @param domain In the preview version, this is interpreted as a Netlify site ID. Domains are not supported
* @param routes
*/
function domain(domain: string, routes: domain.Input): domain.Output;
}
export {};