Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test case #7

Open
dima117 opened this issue May 24, 2016 · 2 comments
Open

test case #7

dima117 opened this issue May 24, 2016 · 2 comments

Comments

@dima117
Copy link

dima117 commented May 24, 2016

Bemhint says that this object is correct, but actually it is invalid ('elem' field expected):

(
    {
        mustDeps: {
            elems: [{ }]
        }
    }
)
@qfox
Copy link

qfox commented May 24, 2016

Why? All is totally fine with your sample.

In your case using elems is the same as using elem.

There is difference between elem and elems for chunks with block property like:

({
  block: 'another-block',
  [prop]: ['elem1', 'elem2', ...]
})

With 'elem' it will be resolved to:

([
  {block: 'another-block', elem: 'elem1'},
  {block: 'another-block', elem: 'elem2'} 
])

With 'elems' to:

([
  {block: 'another-block'}
  {block: 'another-block', elem: 'elem1'},
  {block: 'another-block', elem: 'elem2'}
])

So the difference in requiring block chunk itself.

@qfox
Copy link

qfox commented May 24, 2016

Ah, I just get that looks like it should report this one:

[{
  mustDeps: {
    elem: [{}] // elem can be only {string|string[]}, not {object[]}
  }
}]

And the initial case is also actual. My bad.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants