Improve Prop Typings for Modals. Remove instances of any. (#792)

* Update typings for modals. Remove instances of `any`

* Fix generic type for creating modals
This commit is contained in:
Jason Rametta
2023-10-06 16:34:21 -04:00
committed by GitHub
parent 89b880d9ae
commit 629f326f4c
9 changed files with 210 additions and 130 deletions

View File

@ -21,7 +21,7 @@ import { removeDoubleNegatives } from '../AvailableVarsHelpers'
import { normaliseAngle } from '../../lib/utils'
import { updateCursors } from '../../lang/util'
const getModalInfo = create(SetAngleLengthModal as any)
const getModalInfo = create(SetAngleLengthModal)
type ButtonType = 'setAngle' | 'setLength'
@ -112,7 +112,7 @@ export const SetAngleLength = ({
value: forceVal,
valueName: angleOrLength === 'setAngle' ? 'angle' : 'length',
shouldCreateVariable: true,
} as any)
})
let finalValue = removeDoubleNegatives(valueNode, sign, variableName)
if (
isReferencingYAxisAngle ||