Bokehjs gives invalid selector error

How should I use in bokehjs (I mean javascript not python)?
In bokehjs when i’m trying to select glyphs or … like:'name')

It works but something like:{name: 'name', type: Line})

It gives invalid selector error!

Looking at the actual definition of select on the BokehJS side it looks like you can only do either:'some_name')  # get all objects with name = 'some_name'

or  # get all objects of type Line

If you’d like to propose expanding the capability on the BokehJS side, a GitHub issue would be appropriate.