# 04 · discriminated-props **演示**:组件 props 用可辨识联合表达「error 必须带 message」;`useCounter` 展示 hook 的类型形态。 **运行**:在 `tutorials/typescript` 下执行 `npm run build`,再执行 `npm run serve`,打开 `http://localhost:8080/examples/29-jsx-react-types/04-discriminated-props/`;开 Console。 **预期控制台输出**: ```text