代码
提交代码
function buildLabel(name: string): string { return buildLabel.prefix + name + buildLabel.suffix } namespace buildLabel { export let suffix = '.C' export let prefix = 'Hello, ' } console.log(buildLabel('Mr.Pioneer')) // Hello, Mr.Pioneer.C
运行结果