# 04 · const-type-parameter **演示**:`` 让调用方不写 `as const` 也能得到字面量与只读元组。 **运行**:在 `tutorials/typescript` 下执行 `npm run build`,再执行 `npm run serve`,打开 `http://localhost:8080/examples/06-generics/04-const-type-parameter/`;开 Console。 **预期控制台输出**: ```text a,b /home 3 ``` **类型检查**:`node node_modules/typescript/bin/tsc -p examples/06-generics/04-const-type-parameter/tsconfig.types.json` **注意**:`const` 修饰的是类型参数,不是变量;它同样不影响运行时。