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: Support more keyof for IndexedAccessTypes #1065

Merged
merged 7 commits into from
Aug 13, 2023
Merged

Conversation

sunrabbit123
Copy link
Collaborator

Description:

function f90<T extends S2, K extends keyof S2>(x1: S2[keyof S2], x2: T[keyof S2], x3: S2[K]) {
    x1 = x2;
    x1 = x3;
    x2 = x1;
    x2 = x3;
    x3 = x1;
    x3 = x2;
    x1.length;
    x2.length;
    x3.length;
}

BREAKING CHANGE:

Related issue (if exists):

sunrabbit123 and others added 5 commits August 13, 2023 22:06
**Description:**

```ts
// @strictNullChecks: true
// @declaration: true

class A<T> {
	props: T & { foo: string };
}

class B extends A<{ x: number}> {
	f(p: this["props"]) {
		p.x;
	}
}
```
kdy1
kdy1 previously approved these changes Aug 13, 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!

Can you rebase, please?

@github-actions
Copy link

github-actions bot commented Aug 13, 2023

Thank you for the PR!
Commit: d25bcf7

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.

@kdy1 kdy1 changed the title feat: implement keyof and indexedAccess about type_mode(intersection and union) feat: Support more keyof for IndexedAccessTypes Aug 13, 2023
@kdy1 kdy1 enabled auto-merge (squash) August 13, 2023 13:54
@kdy1 kdy1 merged commit 92191dc into dudykr:main Aug 13, 2023
8 checks passed
@sunrabbit123 sunrabbit123 deleted the fix/3 branch August 14, 2023 17:28
@sunrabbit123 sunrabbit123 added this to the v0.0.1: Correctness milestone Aug 22, 2023
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.

2 participants