类型系统基础
类型系统高阶
模块组织史与工程
前端平台类型
工程化与综合
13-declaration-files
13-declaration-files/01-ambient-declaration/lib/legacy-math.js
javascript · 0.2 KB
运行:13 · ambient-declaration
点击「运行示例」后,左侧显示源码、右侧显示运行结果;console 输出会实时回传。
console
// 一个没有类型声明的老式全局库:脚本加载后挂在 globalThis 上 globalThis.LegacyMath = { version: '1.0.0', add(a, b) { return a + b; }, };
该文件由构建期采集,未做任何改写;源码页不进入搜索引擎索引。