Skip to content

Fix missed Previewer.plain call due to adjacent @ts-expect-error #121975

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

Merged
merged 1 commit into from
Apr 28, 2021

Conversation

andrewbranch
Copy link
Member

I used a // @ts-expect-error until 4.3 protocol update comment in some completions code in #119009, but it unintentionally silenced an error that should have arisen as part of @mjbvz’s refactor in #119358. I’ve fixed that, and also shuffled some of the remaining temporary // @ts-expect-error comments to target less code.

I also wrote a smoke test to add to completions.test.ts, but I’m not sure how to run it (without running all smoke tests), and I have low confidence I wrote it correctly, so I haven’t committed it yet. But the content is

test('Import statement completions should work', async () => {
	await createTestEditor(vscode.Uri.parse('/node_modules/styled-components/index.d.ts'),
		`export declare function styled(): any;`
	);

	const indexUri = vscode.Uri.parse('/index.ts');
	const editor = await createTestEditor(indexUri,
		`import sty`
	);

	await acceptFirstSuggestion(indexUri, _disposables);

	assertEditorContents(editor, `import { styled } from "styled-components";`);
});

I also suppose this won’t work until smoke tests are run against TypeScript 4.3, and I’m not sure how that works either.

@mjbvz mjbvz added this to the April 2021 milestone Apr 23, 2021
@mjbvz mjbvz merged commit 033f6aa into microsoft:main Apr 28, 2021
@mjbvz
Copy link
Collaborator

mjbvz commented Apr 28, 2021

Thanks! Will follow up on the test once we pick up TS 4.3

@mjbvz mjbvz modified the milestones: April 2021, May 2021 Apr 28, 2021
@andrewbranch andrewbranch deleted the bug/fix-source-display branch April 28, 2021 21:43
@github-actions github-actions bot locked and limited conversation to collaborators Jun 12, 2021
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