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

Strict mode #116

Closed
wants to merge 4 commits into from
Closed

Strict mode #116

wants to merge 4 commits into from

Conversation

fgnass
Copy link

@fgnass fgnass commented Aug 20, 2020

As discussed in #108 this PR adds a strict flag to the config.

Felix Gnass added 4 commits August 19, 2020 16:18
With this change the compiler will yield an error when tokens are defined but raw values are used instead.

In order to use non-token values developers must add `as any` or `@ts-ignore`.
  https://twitter.com/fgnass/status/1296034855562743808
This change allows the use of non-token values if no tokens are defined for the corresponding category.
Adds a strict flag as discussed in #108
});
css({
color: "primary",
// @ts-ignore
Copy link
Contributor

Choose a reason for hiding this comment

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

I saw in a diff PR you used @ts-expect-error. just wondering if its also worth using it here instead of a @ts-ignore?

Copy link
Author

Choose a reason for hiding this comment

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

I had @ts-expect-error here first but for some reason the tests then failed, even though the build succeeded. I didn't investigate further why things are different when running through ts-jest and opted for this quick fix.

@peduarte
Copy link
Contributor

peduarte commented Sep 4, 2020

@fgnass hey. sorry for the delay on this. we had to put it on hold, as we were getting ready to officially launch stitches.

I'm keen on getting this in for the next release. we need to:

Thanks!

@peduarte peduarte changed the base branch from master to canary September 4, 2020 12:52
@peduarte
Copy link
Contributor

Closing in favour of #206

@peduarte peduarte closed this Sep 10, 2020
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