Clarify the remark about the Pointer<O>
type
https://github.com/theatre-js/theatre/pull/118#discussion_r846628315
This commit is contained in:
parent
bd8999f0f2
commit
72ada325be
1 changed files with 1 additions and 1 deletions
|
@ -41,7 +41,7 @@ export type PointerType<O> = {
|
||||||
* ```ts
|
* ```ts
|
||||||
* declare function expectAnyPointer(pointer: Pointer<any>): void
|
* declare function expectAnyPointer(pointer: Pointer<any>): void
|
||||||
*
|
*
|
||||||
* expectAnyPointer(null as Pointer<{}>) // doesn't work
|
* expectAnyPointer(null as Pointer<{}>) // this shows as a type error because Pointer<{}> is not assignable to Pointer<any>, even though it should
|
||||||
* ```
|
* ```
|
||||||
*
|
*
|
||||||
* The current solution is to just avoid using `any` with pointer-related code (or type-test it well).
|
* The current solution is to just avoid using `any` with pointer-related code (or type-test it well).
|
||||||
|
|
Loading…
Reference in a new issue