aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Jarred Sumner <jarred@jarredsumner.com> 2021-09-27 21:25:06 -0700
committerGravatar Jarred Sumner <jarred@jarredsumner.com> 2021-09-27 21:25:06 -0700
commite51155d8e6f1dac365cb0ba3373077e80460cc93 (patch)
tree1cedc9391777215c857959f8cdb96d75766ee116
parent2bb7f71b9c88b680008564cdf56186360228c317 (diff)
downloadbun-e51155d8e6f1dac365cb0ba3373077e80460cc93.tar.gz
bun-e51155d8e6f1dac365cb0ba3373077e80460cc93.tar.zst
bun-e51155d8e6f1dac365cb0ba3373077e80460cc93.zip
Remove
-rw-r--r--examples/macros/matchInFile.tsx78
1 files changed, 0 insertions, 78 deletions
diff --git a/examples/macros/matchInFile.tsx b/examples/macros/matchInFile.tsx
index 1f5c20fb3..bd1c92dea 100644
--- a/examples/macros/matchInFile.tsx
+++ b/examples/macros/matchInFile.tsx
@@ -21,81 +21,3 @@ export function matchInFile(callExpression: BunAST.CallExpression) {
</array>
);
}
-
-export declare namespace BunAST {
- export abstract class ASTNode {
- constructor(...args: any);
- }
-
- export interface ASTElement<
- P = any,
- T extends string | JSXElementConstructor<any> =
- | string
- | JSXElementConstructor<any>
- > {
- type: T;
- props: P;
- key: Key | null;
- }
-
- export abstract class Expression extends ASTNode {}
-
- export abstract class CallExpression extends Expression {
- arguments: AnyExpression[];
- name: string;
- target: AnyExpression;
- }
-
- export abstract class StringExpression extends Expression {
- get(): string;
- value: string;
- }
-
- export interface StringExpressionElementProps {
- value: string;
- }
-
- export type StringExpressionElement = ASTElement<
- StringExpressionElementProps,
- StringExpression
- >;
-
- export abstract class RegExpExpression extends Expression {
- get(): RegExp;
-
- flags: string;
- pattern: string;
- raw: string;
- }
-
- export type AnyExpression =
- | CallExpression
- | StringExpression
- | RegExpExpression;
-}
-
-declare global {
- namespace JSX {
- interface Element extends BunAST.ASTElement<any, BunAST.AnyExpression> {}
- interface ElementClass extends BunAST.Expression {}
- interface ElementAttributesProperty {
- props: {};
- }
- interface ElementChildrenAttribute {
- children: {};
- }
-
- // // We can't recurse forever because `type` can't be self-referential;
- // // let's assume it's reasonable to do a single React.lazy() around a single React.memo() / vice-versa
- // type LibraryManagedAttributes<C, P> = C extends React.MemoExoticComponent<infer T> | React.LazyExoticComponent<infer T>
- // ? T extends React.MemoExoticComponent<infer U> | React.LazyExoticComponent<infer U>
- // ? ReactManagedAttributes<U, P>
- // : ReactManagedAttributes<T, P>
- // : ReactManagedAttributes<C, P>;
-
- interface IntrinsicElements {
- // HTML
- string: BunAST.StringExpressionElement;
- }
- }
-}