kjelsrud.dev/node_modules/@mdx-js/mdx/lib/util/estree-util-declaration-to-expression.d.ts
2023-07-19 21:31:30 +02:00

19 lines
682 B
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

/**
* @typedef {import('estree-jsx').Declaration} Declaration
* @typedef {import('estree-jsx').Expression} Expression
*/
/**
* Turn a declaration into an expression.
*
* Doesnt work for variable declarations, but thats fine for our use case
* because currently were using this utility for export default declarations,
* which cant contain variable declarations.
*
* @param {Declaration} declaration
* Declaration.
* @returns {Expression}
* Expression.
*/
export function declarationToExpression(declaration: Declaration): Expression;
export type Declaration = import('estree-jsx').Declaration;
export type Expression = import('estree-jsx').Expression;