示例工程 21-commonjs-snapshot

21-commonjs-snapshot/01-cjs-shim/cjs/app.ts

typescript · 0.1 KB

运行:21 · cjs-shim

点击「运行示例」后,左侧显示源码、右侧显示运行结果;console 输出会实时回传。

import math = require('./math');
 
const app = {
  sum(a: number, b: number): number {
    return math.add(a, b);
  },
};
 
export = app;