Skip to content

fs: walkSync returns a type without iterator helpers #7099

@greentore

Description

@greentore

Describe the bug
walkSync returns IterableIterator<WalkEntry>, which doesn't implement iterator helper methods. However it's implemented as a generator function so it has them at the runtime.

Steps to Reproduce

const a = walkSync(".");
const b = a.map(v => v.name); // Property 'map' does not exist on type 'IterableIterator<WalkEntry>'.

Environment

  • OS: Windows 10
  • deno version: deno 2.7.11
  • std version: 1.0.23

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions