# 02 · top-level-this **演示**:ES 模块顶层的 `this` 是 `undefined`,而 classic 脚本顶层是全局对象。 **运行**:在 `tutorials/typescript` 下执行 `npm run build`,再执行 `npm run serve`,打开 `http://localhost:8080/examples/23-esm-live-bindings/02-top-level-this/`;开 Console。 **预期控制台输出**: ```text topThis:undefined ``` **类型检查**:`node node_modules/typescript/bin/tsc -p examples/23-esm-live-bindings/02-top-level-this/tsconfig.types.json` **注意**:类型层对顶层 `this` 的建模与运行时不同;不要用类型判断它的值。