Internals
This reference documents implementation details.
A Dates.jl package extension would currently print warnings during precompilation. See also the Julia issue #52511
Precompile
Typstry.Precompile.compile_workload — Function
compile_workload(examples)Strings
Typstry.Strings.Utilities.escape — Function
escape(io::IO, count::Int)Print \ to io count times.
Examples
julia> using Typstry: Strings.Utilities.escape
julia> escape(stdout, 1)
\
julia> escape(stdout, 2)
\\Typstry.Strings.Utilities.format — Function
format(::Union{
MIME"application/pdf",
MIME"image/gif",
MIME"image/jpg",
MIME"image/png",
MIME"image/svg+xml",
MIME"image/webp"
})Return the image format acronym corresponding to the given MIME.
Examples
julia> using Typstry: Strings.Utilities.format
julia> format(MIME"application/pdf"())
"pdf"
julia> format(MIME"image/png"())
"png"
julia> format(MIME"image/svg+xml"())
"svg"Utilities
Typstry.Utilities.enclose — Function
enclose(callback, io, value, left, right = reverse(left); parameters...)Call callback(io, value; parameters...) between printing left and right, respectfully.
Examples
julia> Typstry.Utilities.enclose((io, i; x) -> print(io, i, x), stdout, 1, "\$ "; x = "x")
$ 1x $Typstry.Utilities.join_with — Function
join_with(callback, io, values, delimeter; keyword_parameters...)Similar to join, except printing with callback(io, value; keyword_parameters...).
Examples
julia> Typstry.Utilities.join_with((io, i; x) -> print(io, -i, x), stdout, 1:4, ", "; x = "x")
-1x, -2x, -3x, -4x