utils.ts 342 B

12345678910111213141516
  1. import type { Var } from '../../types'
  2. import { VarType } from '../../types'
  3. export const checkNodeValid = () => {
  4. return true
  5. }
  6. export const filterVar = (varType: VarType) => {
  7. return (v: Var) => {
  8. if (varType === VarType.any)
  9. return true
  10. if (v.type === VarType.any)
  11. return true
  12. return v.type === varType
  13. }
  14. }