docs(assert): edit reference link
Some checks failed
TypeScript tutorial CI / Generating pages (push) Has been cancelled

This commit is contained in:
ruanyf
2024-09-23 11:12:42 +08:00
parent b376397025
commit f68cdbc910

View File

@@ -490,7 +490,7 @@ function assertIsDefined<T>(
上面示例中,工具类型`NonNullable<T>`对应类型`T`去除空类型后的剩余类型。
如果要将断言函数用于函数表达式,可以采用下面的写法。根据 TypeScript 的[要求](https://github.com/microsoft/TypeScript/pull/33622),这时函数表达式所赋予的变量,必须有明确的类型声明。
如果要将断言函数用于函数表达式,可以采用下面的写法。根据 TypeScript 的[要求](https://github.com/microsoft/TypeScript/pull/33622#issuecomment-575301357),这时函数表达式所赋予的变量,必须有明确的类型声明。
```typescript
type AssertIsNumber =