assemblyscript
assemblyscript copied to clipboard
[Std][Feature] Implement String.dedent
Currently, it is on Stage 2, slides. But it's quite important, especially for AssemblyScript which doesn't provide custom templates on user space yet.
Implementation Plan
Similar to String.raw it should be completely implemented as compiler's builtin.
-
Add builtin stub
@builtin static dedent(parts: TemplateStringsArray, ...substitutions: unknown[]): string { return unreachable(); }to
std/string.ts -
Add implementation for
function builtin_string_dedent(ctx: BuiltinContext): ExpressionRefinsrc/builtin.tsfollowing by proposal-string-dedent spec