Skip to content

Preserve exact string type #12

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

Open
fregante opened this issue Feb 22, 2023 · 2 comments
Open

Preserve exact string type #12

fregante opened this issue Feb 22, 2023 · 2 comments
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@fregante
Copy link
Owner

import {css} from 'code-tag';

const exactString = `.class {}`
      // ^? ".class {}"
const justString = css`.class {}`;
      // ^? string

https://www.typescriptlang.org/play?target=2&ssl=7&ssc=1&pln=1&pc=1#code/JYWwDg9gTgLgBAbwMYGcUF84DMoRHAciQgBMBTAWhgEMBzAgbgCgniA7FeMgD2qRgDKMKMDa04AXjgADAHRIANtTSJ00pnE1aA9NrgA9APysIHeACsArpyEixkuKhRzFylKunMtOvUaZA

@fregante
Copy link
Owner Author

ChatGPT was painfully unable to figure this out. Copilot Chat even worse.

@fregante
Copy link
Owner Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant