kjelsrud.dev/node_modules/@mdx-js/mdx/lib/util/estree-util-declaration-to-expression.d.ts

20 lines
682 B
TypeScript
Raw Normal View History

2023-07-19 21:31:30 +02:00
/**
* @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;