core/formatters/learning.formatter.ts

core/formatters/learning.formatter.ts is a file in Bane's Lab Build Scripts. 9 lines of code and 1 definition.

import type { Block } from "#types/learning.types";

export const renderLearning = function renderLearning(blocks: readonly Block[]): string {
    return [
        'import type { LearningBlock } from "#types/learning.types";',
        "",
        `export const LEARNING: readonly LearningBlock[] = JSON.parse(${JSON.stringify(JSON.stringify(blocks))});`,
        "",
    ].join("\n");
};