mirror of
https://github.com/ianstormtaylor/slate.git
synced 2025-08-26 08:34:28 +02:00
TypeScript Improvement: Use [key: string]: unknown
, not [key: string]: any
(#3566)
* Change all [key:string]:any -> unknown Skipping slate-hyperscript, since it seems to be an appropriate use of key: any * Minor typo fix docs/api/locations * Check/assert unknown attributes when needed
This commit is contained in:
@@ -37,7 +37,7 @@ Points are slightly more specific than paths, and contain an `offset` into a spe
|
||||
interface Point {
|
||||
path: Path
|
||||
offset: number
|
||||
[key: string]: any
|
||||
[key: string]: unknown
|
||||
}
|
||||
```
|
||||
|
||||
@@ -71,7 +71,7 @@ Ranges are a way to refer not just to a single point in the document, but to a w
|
||||
interface Range {
|
||||
anchor: Point
|
||||
focus: Point
|
||||
[key: string]: any
|
||||
[key: string]: unknown
|
||||
}
|
||||
```
|
||||
|
||||
|
Reference in New Issue
Block a user