function (document as text, optional environment as nullable record) as nullable any
document
environment