Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(lang-ts): support lang="ts" in <style> and <custom> blocks #208

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

Tahul
Copy link

@Tahul Tahul commented Sep 13, 2023

Resolvs #207 ;

This PR is still work in progress.

It currently:

  • Adds a fixture for expected working setup
  • Adds two tests for expected working outputs
  • Begins implementation by:
    • Change filtering of nodes in ast-utils to cast lang="ts" blocks as <script> elements
    • Change getScriptSetupModuleCodeBlocks, parseScriptSetupElements and parseAsSFC implementation to support scriptElements instead of scriptElement

Any idea or suggestion for next steps is welcome :)

@Tahul
Copy link
Author

Tahul commented Sep 13, 2023

Here is a little snippet of current status:

CleanShot.2023-09-13.at.17.46.44.mp4

@Tahul
Copy link
Author

Tahul commented Sep 14, 2023

The CI failing seem to be caused by this:

node_modules/@typescript-eslint/typescript-estree/dist/ts-estree/estree-to-ts-node-types.d.ts:60:44 - error TS2694: Namespace 'ts' has no exported member 'JsxNamespacedName'.

That seem to be due to the fact this repository does not use a lockfile and so it is impossible for me to know which exact version of this dependency is used to run the tests.

@ota-meshi
Copy link
Member

Thank you!
I will change the tsconfig.json to avoid the error in CI. #209

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