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

[12/03] index signature vs mapped type #62

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

bada308
Copy link
Collaborator

@bada308 bada308 commented Dec 3, 2023

No description provided.

@bada308 bada308 self-assigned this Dec 3, 2023
Copy link
Collaborator

@loopy-lim loopy-lim left a comment

Choose a reason for hiding this comment

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

mapped type이 정말 강력하네요

Comment on lines +42 to +52
type ChangeType<T> = {
[K in keyof T]: number;
};

type Result = ChangeType<Obj>;
/**
* {
* prop1: number;
* prop2: number;
* }
*/
Copy link
Collaborator

Choose a reason for hiding this comment

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

타입스크립트는 보면 볼수로 타입에 대해서 정의해주는 능력이 뛰어나군요!
이렇게 좋은 document가 느려진다는 것은 얼마만큼 커야 가능할까요? ㄷㄷㄷㄷ....

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