Skip to content

Use IterableIterator, not MapIterator#259

Closed
machty wants to merge 1 commit intovolarjs:masterfrom
machty:fix-map-iterator
Closed

Use IterableIterator, not MapIterator#259
machty wants to merge 1 commit intovolarjs:masterfrom
machty:fix-map-iterator

Conversation

@machty
Copy link
Collaborator

@machty machty commented Jan 8, 2025

Some reason the current volar package uses the non-existent MapIterator when it should be using IterableIterator. This is causing my local TS compilation to fail. I'm not sure why others aren't encountering it.

https://unpkg.com/@volar/language-core@2.4.11/lib/utils.d.ts

Perhaps this PR will fix it; then again, in my local of the Volar library, it correctly generates IterableIterator, so I don't have a way of testing this fix.

@pkg-pr-new
Copy link

pkg-pr-new bot commented Jan 8, 2025

Open in Stackblitz

@volar/eslint

npm i https://pkg.pr.new/volarjs/volar.js/@volar/eslint@259

@volar/kit

npm i https://pkg.pr.new/volarjs/volar.js/@volar/kit@259

@volar/jsdelivr

npm i https://pkg.pr.new/volarjs/volar.js/@volar/jsdelivr@259

@volar/language-core

npm i https://pkg.pr.new/volarjs/volar.js/@volar/language-core@259

@volar/language-server

npm i https://pkg.pr.new/volarjs/volar.js/@volar/language-server@259

@volar/language-service

npm i https://pkg.pr.new/volarjs/volar.js/@volar/language-service@259

@volar/monaco

npm i https://pkg.pr.new/volarjs/volar.js/@volar/monaco@259

@volar/source-map

npm i https://pkg.pr.new/volarjs/volar.js/@volar/source-map@259

@volar/test-utils

npm i https://pkg.pr.new/volarjs/volar.js/@volar/test-utils@259

@volar/typescript

npm i https://pkg.pr.new/volarjs/volar.js/@volar/typescript@259

@volar/vscode

npm i https://pkg.pr.new/volarjs/volar.js/@volar/vscode@259

commit: 03ebaac

@jasonlyu123
Copy link

@machty
Copy link
Collaborator Author

machty commented Jan 9, 2025

MapIterator is a new type introduced in TypeScript 5.6 https://devblogs.microsoft.com/typescript/announcing-typescript-5-6/#strict-builtin-iterator-checks-(and---strictbuiltiniteratorreturn)

Hmm, sounds like the solution then is to bump our dependency on TypeScript.

Volar seems to hug new versions of TS pretty closely; does that mean everyone using Vue tooling is constantly upgrading TS? Or does the tooling use its own version of TS separate from the project workspace?

@machty
Copy link
Collaborator Author

machty commented Jan 9, 2025

ah I can just use lib: "ES2021" or some earlier version than ESNext with a newer version of TS and it won't complain

@machty machty closed this Jan 9, 2025
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

Successfully merging this pull request may close these issues.

2 participants