docs: add util to generate clean markdown for a file (#11303)

This commit is contained in:
Shahed Nasser
2025-02-04 16:44:17 +02:00
committed by GitHub
parent 3c51709daf
commit 604f46f8bc
23 changed files with 832 additions and 37 deletions

View File

@@ -0,0 +1,21 @@
import { ExpressionJsVarLiteral, ExpressionJsVarObj } from "types"
export function isExpressionJsVarLiteral(
expression: unknown
): expression is ExpressionJsVarLiteral {
return (
typeof expression === "object" &&
expression !== null &&
Object.hasOwn(expression, "original")
)
}
export function isExpressionJsVarObj(
expression: unknown
): expression is ExpressionJsVarObj {
return (
typeof expression === "object" &&
expression !== null &&
!Object.hasOwn(expression, "original")
)
}