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:
parent
191186af43
commit
dc1fe7d9c3
2 changed files with 0 additions and 39 deletions
|
@ -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",
|
||||
|
|
|
@ -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;
|
Loading…
Reference in a new issue