From dc1fe7d9c3b65d8cc9fab3cac927ff1aadbf415b Mon Sep 17 00:00:00 2001 From: Nate Moore Date: Thu, 27 May 2021 07:10:14 -0500 Subject: [PATCH] chore: cleanup deps (#261) --- packages/astro/package.json | 2 -- packages/astro/src/@types/renderer.ts | 37 --------------------------- 2 files changed, 39 deletions(-) delete mode 100644 packages/astro/src/@types/renderer.ts diff --git a/packages/astro/package.json b/packages/astro/package.json index 849affab5e..2a7e143813 100644 --- a/packages/astro/package.json +++ b/packages/astro/package.json @@ -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", diff --git a/packages/astro/src/@types/renderer.ts b/packages/astro/src/@types/renderer.ts deleted file mode 100644 index f89cb66641..0000000000 --- a/packages/astro/src/@types/renderer.ts +++ /dev/null @@ -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 { - renderStatic: StaticRendererGenerator; - jsxPragma?: (...args: any) => any; - jsxPragmaName?: string; - render(context: { root: string; Component: string; props: string; [key: string]: string }): string; - imports?: Record; -} - -export interface ComponentContext { - 'data-astro-id': string; - root: string; -} - -export type SupportedComponentRenderer = - | ComponentRenderer - | ComponentRenderer - | ComponentRenderer - | ComponentRenderer; -export type StaticRenderer = (props: Record, ...children: any[]) => Promise; -export type StaticRendererGenerator = (Component: T) => StaticRenderer; -export type DynamicRenderer = (props: Record, ...children: any[]) => Promise; -export type DynamicRendererContext = (Component: T, renderContext: DynamicRenderContext) => DynamicRenderer; -export type DynamicRendererGenerator = ( - wrapperStart: string | ((context: ComponentContext) => string), - wrapperEnd: string | ((context: ComponentContext) => string) -) => DynamicRendererContext;