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

feat: Handle assignment of a template literal to a number #1048

Open
wants to merge 7 commits into
base: main
Choose a base branch
from

Conversation

awareness481
Copy link
Contributor

@awareness481 awareness481 commented Jun 12, 2023

function f4<T extends number>(s: string, n: number, b: boolean, t: T) {
  let x: `*${number}*`;
  x = `*${b}*` as const; // Error
}

Reports the required error for the above case where *${boolean}* is assigned to *${number}*

@github-actions
Copy link

github-actions bot commented Jun 12, 2023

Thank you for the PR!
Commit: ba73ea7

Files to check

These are files which is affected by the current PR, but not reflected. If there's no file below this message, please ignore this message.

You can run ./scripts/auto-unignore.sh from crates/stc_ts_file_analyzer for typescript files, and ./scripts/check.sh from crates/stc_ts_type_checker for *.stats.rust-debug files.

@awareness481 awareness481 marked this pull request as draft June 12, 2023 17:12
@awareness481 awareness481 marked this pull request as ready for review June 17, 2023 05:55
@awareness481 awareness481 changed the title Draft: Assigning tpl to keyword Assigning tpl to keyword Jun 17, 2023
Copy link
Member

@kdy1 kdy1 left a comment

Choose a reason for hiding this comment

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

Thank you, and I'm back! Sorry for the delay. I'll busy for few days more, but I'll have lots of time after then.

@kdy1 kdy1 changed the title Assigning tpl to keyword feat: Handle assignment of a template literal to a number Aug 7, 2023
@kdy1
Copy link
Member

kdy1 commented Aug 7, 2023

Can you rebase?

@kdy1 kdy1 added this to the v0.0.1: Correctness milestone Aug 7, 2023
@awareness481
Copy link
Contributor Author

This has been at the back of my mind for the past two months but I ve been extremely busy the last two months. I will get to it asap!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants