8000 fix(twoslash): completion on multifile by jxom · Pull Request #100 · antfu/shikiji · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
This repository was archived by the owner on Feb 7, 2024. It is now read-only.

fix(two 8000 slash): completion on multifile #100

Merged
merged 4 commits into from
Jan 17, 2024

Conversation

jxom
Copy link
Contributor
@jxom jxom commented Jan 17, 2024

It seems that completions break when used with virtual files. This PR includes minimal reproducible tests.

Example 1

Input:

// @noErrors
// @filename: foo.ts
const foo = "foo"
export { foo }

// @filename: index.ts
// ---cut---
import { foo } from './foo'

type Example = {
  name: 'foo' | 'bar' | 'baz'
}

const example: Example = { name: 'foo' }
example.name === '   
//                ^|

Output:

Error thrown.

Expected:

Completion list of "foo", "bar", "baz".

Example 2

Input:

// @noErrors
// @filename: foo.ts
const foo = "foo"
export { foo }

// @filename: index.ts
// ---cut---
import { foo } from './foo'

console.e 
//       ^|

Output:

Screenshot 2024-01-17 at 11 25 37 am

Expected:

Completion list of "error".

jxom added 2 commits January 17, 2024 11:21
< 8000 div class="AvatarStack-body" > @jxom
Copy link
netlify bot commented Jan 17, 2024

Deploy Preview for shikiji ready!

Name Link
🔨 Latest commit 30bf2cd
🔍 Latest deploy log https://app.netlify.com/sites/shikiji/deploys/65a7ecc4009b6d000884ae25
😎 Deploy Preview https://deploy-preview-100--shikiji.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@antfu antfu changed the title bug: multifile completion fix(twoslash): completion on multifile Jan 17, 2024
Copy link
codecov bot commented Jan 17, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (772757c) 96.77% compared to head (30bf2cd) 96.77%.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #100   +/-   ##
=======================================
  Coverage   96.77%   96.77%           
=======================================
  Files          51       51           
  Lines        4495     4495           
  Branches      572      572           
=======================================
  Hits         4350     4350           
  Misses        142      142           
  Partials        3        3           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@antfu antfu merged commit ac6298b into antfu:main Jan 17, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
0