Parcourir la source

Fix typing

main
Steve Ruiz il y a 3 ans
Parent
révision
c52c8f4c76
1 fichiers modifiés avec 3 ajouts et 3 suppressions
  1. 3
    3
      lib/code/index.ts

+ 3
- 3
lib/code/index.ts Voir le fichier

@@ -1,4 +1,4 @@
1
-import { Shape } from 'types'
1
+import { Mutable, Shape } from 'types'
2 2
 import shapeUtilityMap, {
3 3
   createShape,
4 4
   getShapeUtils,
@@ -15,11 +15,11 @@ export const codeShapes = new Set<CodeShape<Shape>>([])
15 15
  * shape map, while deleting it removes it from the collected shapes set
16 16
  */
17 17
 export default class CodeShape<T extends Shape> {
18
-  private _shape: T
18
+  private _shape: Mutable<T>
19 19
   private utils: ShapeUtility<T>
20 20
 
21 21
   constructor(props: T) {
22
-    this._shape = createShape(props.type, props) as T
22
+    this._shape = createShape(props.type, props) as Mutable<T>
23 23
     this.utils = getShapeUtils<T>(this._shape)
24 24
     codeShapes.add(this)
25 25
   }

Chargement…
Annuler
Enregistrer