MCPcopy Create free account
hub / github.com/CoderLine/alphaTab / printer

Method printer

packages/alphatab/test/PrettyFormat.ts:88–106  ·  view source on GitHub ↗
(
        val: unknown,
        config: PrettyFormatConfig,
        indentation: string,
        depth: number,
        refs: unknown[]
    )

Source from the content-addressed store, hash-verified

86 }
87
88 static printer(
89 val: unknown,
90 config: PrettyFormatConfig,
91 indentation: string,
92 depth: number,
93 refs: unknown[]
94 ): string {
95 const plugin = PrettyFormat.findPlugin(config.plugins, val);
96 if (plugin !== null) {
97 return plugin.serialize(val, config, indentation, depth, refs, PrettyFormat.printer);
98 }
99
100 const basicResult = PrettyFormat.printBasicValue(val, config.escapeString);
101 if (basicResult !== null) {
102 return basicResult;
103 }
104
105 return PrettyFormat.printComplexValue(val, config, indentation, depth, refs);
106 }
107
108 static printNumber(val: number): string {
109 return val.toString();

Callers 2

formatMethod · 0.80

Calls 4

findPluginMethod · 0.80
printBasicValueMethod · 0.80
printComplexValueMethod · 0.80
serializeMethod · 0.65

Tested by

no test coverage detected