findAll error

I am trying to explore

In code.ts,

let allNodes = Figma.currentPage.selection[0].findAll();

I am getting error for findAll()

Error is
Property ‘findAll’ does not exist on type ‘SceneNode’.
Property ‘findAll’ does not exist on type ‘SliceNode’.