0
Fork 0
mirror of https://github.com/withastro/astro.git synced 2024-12-16 21:46:22 -05:00

chore: cleanup deps (#261)

This commit is contained in:
Nate Moore 2021-05-27 07:10:14 -05:00 committed by GitHub
parent 191186af43
commit dc1fe7d9c3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 0 additions and 39 deletions

View file

@ -103,8 +103,6 @@
"@types/github-slugger": "^1.3.0",
"@types/mime": "^2.0.3",
"@types/node": "^14.14.31",
"@types/react": "^17.0.3",
"@types/react-dom": "^17.0.2",
"@types/sass": "^1.16.0",
"@types/yargs-parser": "^20.2.0",
"astro-scripts": "0.0.1",

View file

@ -1,37 +0,0 @@
import type { Component as VueComponent } from 'vue';
import type { ComponentType as PreactComponent } from 'preact';
import type { ComponentType as ReactComponent } from 'react';
import type { SvelteComponent } from 'svelte';
export interface DynamicRenderContext {
componentUrl: string;
componentExport: string;
frameworkUrls: string;
}
export interface ComponentRenderer<T> {
renderStatic: StaticRendererGenerator<T>;
jsxPragma?: (...args: any) => any;
jsxPragmaName?: string;
render(context: { root: string; Component: string; props: string; [key: string]: string }): string;
imports?: Record<string, string[]>;
}
export interface ComponentContext {
'data-astro-id': string;
root: string;
}
export type SupportedComponentRenderer =
| ComponentRenderer<VueComponent>
| ComponentRenderer<PreactComponent>
| ComponentRenderer<ReactComponent>
| ComponentRenderer<SvelteComponent>;
export type StaticRenderer = (props: Record<string, any>, ...children: any[]) => Promise<string>;
export type StaticRendererGenerator<T = any> = (Component: T) => StaticRenderer;
export type DynamicRenderer = (props: Record<string, any>, ...children: any[]) => Promise<string>;
export type DynamicRendererContext<T = any> = (Component: T, renderContext: DynamicRenderContext) => DynamicRenderer;
export type DynamicRendererGenerator = (
wrapperStart: string | ((context: ComponentContext) => string),
wrapperEnd: string | ((context: ComponentContext) => string)
) => DynamicRendererContext;