Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
matefun
Infantil
Commits
339f4642
Commit
339f4642
authored
Mar 11, 2022
by
Federico Santiago Luongo Gonnet
Browse files
match lista ML
parent
1502832c
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/classes/helpers/type.js
View file @
339f4642
...
...
@@ -85,12 +85,12 @@ export function getMateFunPipeType(type) {
* to_do (Stéfano): Rehacer esta funcion
*/
export
function
matchTypes
(
type1
,
type2
)
{
const
oneNotDefined
=
(
!
isDefined
(
type1
)
&&
!
isList
(
type1
))
||
(
!
isDefined
(
type2
)
&&
!
isList
(
type2
));
const
oneNotDefined
=
(
!
isDefined
(
type1
)
&&
!
isList
(
type1
)
&&
type1
!=
VALUES_TYPES
.
MULTIPIPE
)
||
(
!
isDefined
(
type2
)
&&
!
isList
(
type2
)
&&
type2
!=
VALUES_TYPES
.
MULTIPIPE
);
const
sameType
=
type1
===
type2
;
const
listMatch
=
isList
(
type1
)
&&
isList
(
type2
)
&&
matchTypes
(
listSubType
(
type1
),
listSubType
(
type2
))
&&
((
listSubType
(
type1
)
!=
VALUES_TYPES
.
MULTIPIPE_OUT
)
&&
(
listSubType
(
type2
)
!=
VALUES_TYPES
.
MULTIPIPE_OUT
));
const
listMatch
=
isList
(
type1
)
&&
isList
(
type2
)
&&
matchTypes
(
listSubType
(
type1
),
listSubType
(
type2
))
&&
((
listSubType
(
type1
)
!=
VALUES_TYPES
.
MULTIPIPE_OUT
)
&&
(
listSubType
(
type2
)
!=
VALUES_TYPES
.
MULTIPIPE_OUT
))
&&
(
type2
!=
VALUES_TYPES
.
MULTIPIPE
)
;
const
multipipe
=
compareMultipipe
(
type1
,
type2
);
const
multipipeout
=
compareMultipipeout
(
type1
,
type2
);
const
indexNumber
=
compareIndexNumber
(
type1
,
type2
);
const
indexNumber
=
compareIndexNumber
(
type1
,
type2
);
return
oneNotDefined
||
sameType
||
listMatch
||
multipipe
||
multipipeout
||
indexNumber
;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment