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

Fix *.modules.scss that don't get correctly typed #5532

Merged
merged 2 commits into from Jun 2, 2022
Merged

Conversation

Nokel81
Copy link
Collaborator

@Nokel81 Nokel81 commented Jun 1, 2022

Signed-off-by: Sebastian Malton sebastian@malton.name

This was only a problem within vscode (and maybe other editors) which is why I marked it as a chore.

Signed-off-by: Sebastian Malton <sebastian@malton.name>
@Nokel81 Nokel81 added the chore label Jun 1, 2022
@Nokel81 Nokel81 added this to the 5.6.0 milestone Jun 1, 2022
@Nokel81 Nokel81 requested a review from aleksfront June 1, 2022 12:42
@Nokel81 Nokel81 requested a review from a team as a code owner June 1, 2022 12:42
@Nokel81 Nokel81 requested review from DmitriyNoa and removed request for a team June 1, 2022 12:42
types/mocks.d.ts Outdated Show resolved Hide resolved
Signed-off-by: Sebastian Malton <sebastian@malton.name>
Copy link
Contributor

@aleksfront aleksfront left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Member

@ixrock ixrock left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why only these files? Looks like a hack.

@Nokel81
Copy link
Collaborator Author

Nokel81 commented Jun 2, 2022

@ixrock I looked at the typescript server logs in vscode to figure out why a specific file was being typed as {} instead of being typed as { AddCluster: string; }. It reported an error from the CSS modules plugin for typescript saying that the theme-light mixin was undefined and that it considered the given file the "root file" for that use.

So I figured that importing the file that defines the theme-light mixin would help solve the issue.

I also tried getting the plugin to accept the mixin file as "always imported" but I couldn't figure out how. I also don't know how the actual transpiler does it.

@Nokel81 Nokel81 merged commit ac27077 into master Jun 2, 2022
@Nokel81 Nokel81 deleted the fix-scss-modules branch June 2, 2022 12:59
@jansav jansav mentioned this pull request Jul 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants