Add static check: warning on several block/mix/attrs/js/etc subpredicates
Opened this issue · 3 comments
miripiruni commented
block('page')(
tag()('body'),
block('content').tag()('article'),
block('footer').tag()('footer')
)
P.S. Test needed.
miripiruni commented
Need tests for cases such as block('a').mod('m1', 'v1').mod('m2', 'v2')…
miripiruni commented
We have three options:
- Throw error only in case of block in block case (
block('a').block('b')… or block('a')(block('b')…)
) (see my commit e7c5cb1) - Throw error in any necessary case:
tag().tag()…
,mix().mix()…
,attrs().attrs()…
,js().js()…
,content().content()…
, etc - Do not throw errors but introduce static check.
IMHO we need a combination of 1 and 3. Because 2 is much more heavy for bundle size.
veged commented
let's do this through static check