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

[to do] implement type param indexing #1063

Closed
2 tasks done
sunrabbit123 opened this issue Aug 13, 2023 · 1 comment
Closed
2 tasks done

[to do] implement type param indexing #1063

sunrabbit123 opened this issue Aug 13, 2023 · 1 comment

Comments

@sunrabbit123
Copy link
Collaborator

sunrabbit123 commented Aug 13, 2023

// @strict: true


function l<T extends {}, P extends keyof T>(s: string, tp: T[P]): void {
    tp = s;
}
function m<T extends { a: number }, P extends keyof T>(s: string, tp: T[P]): void {
    tp = s;
}

T[P] should be number, but stc emit any;

Tasks

@sunrabbit123
Copy link
Collaborator Author

resolve #1067

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

No branches or pull requests

1 participant