Fix to use more accurate types with custom isArray() and add lint (#5261)
* Fix to use more accurate types with custom isArray() * Add lint against Array.isArray()
This commit is contained in:
@ -60,7 +60,7 @@ import {
|
||||
mutateObjExpProp,
|
||||
findUniqueName,
|
||||
} from 'lang/modifyAst'
|
||||
import { roundOff, getLength, getAngle } from 'lib/utils'
|
||||
import { roundOff, getLength, getAngle, isArray } from 'lib/utils'
|
||||
import { err } from 'lib/trap'
|
||||
import { perpendicularDistance } from 'sketch-helpers'
|
||||
import { TagDeclarator } from 'wasm-lib/kcl/bindings/TagDeclarator'
|
||||
@ -96,7 +96,7 @@ export function createFirstArg(
|
||||
sketchFn: ToolTip,
|
||||
val: Expr | [Expr, Expr] | [Expr, Expr, Expr]
|
||||
): Expr | Error {
|
||||
if (Array.isArray(val)) {
|
||||
if (isArray(val)) {
|
||||
if (
|
||||
[
|
||||
'angledLine',
|
||||
|
Reference in New Issue
Block a user