Is the method ofType usable in a collection defined with twig syntax?

Ok found the right syntax :smiley:

        {% set latest_classified = page.collection({
                'items': '@root.descendants',
                'order': {
                    'by': 'date',
                    'dir': 'desc',
                },
                
            })
            .ofType('classified')
            .slice(0,5)
        %}